Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

NFS filesystems not properly excluded #20

@cobrin

Description

@cobrin

The code to exclude NFS and other filesystems does not work properly on CentOS 7 (at least), and will still traverse those filesystems, slowing down the detection process

find / -type f -regextype posix-egrep -iregex .+\.(jar|war|ear|zip)$ ! -fstype nfs ! -fstype nfs4 ! -fstype cifs ! -fstype smbfs ! -fstype gfs ! -fstype gfs2 ! -fstype safenetfs ! -fstype secfs ! -fstype gpfs ! -fstype smb2 ! -fstype vxfs ! -fstype vxodmfs ! -fstype afs -print

a faster version would be

find / -fstype nfs -prune -o -fstype nfs4 -prune -o -fstype cifs -prune -o -fstype smbfs -prune -o -fstype gfs -prune -o -fstype gfs2 -prune -o -fstype safenetfs -prune -o -fstype secfs -prune -o -fstype gpfs -prune -o -fstype smb2 -prune -o -fstype vxfs -prune -o -fstype vxodmfs -prune -o -fstype afs -prune -o -type f -regextype posix-egrep -iregex '.+\.(jar|war|ear|zip)$' -print

This change brought my search time down from over 3 hours to less than a minute!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions