I am searching for the executable file name pxe using the command
find / -type f -executable -print | grep pxe$
and this works fine in RHEL, but in SLES the snapshot directory messses up the search. How to exclude the snapshot directory in my search.
I have tried these combination but did work.
localhost:~ # find / -type f -executable -print | grep pxe$
find: File system loop detected; ‘/.snapshots/1/snapshot’ is part of the same file system loop as ‘/’.
/root/pxe
/root/xyx/pxe
/pxe
localhost:~ # find / -type f -executable -print -not -path "*/.snapshots/*" | grep pxe$
find: File system loop detected; ‘/.snapshots/1/snapshot’ is part of the same file system loop as ‘/’.
/root/pxe
/root/xyx/pxe
/pxe
localhost:~ #
localhost:~ #
localhost:~ # find / -type f -executable -print -not -path "/.snapshots/*" | grep pxe$
find: File system loop detected; ‘/.snapshots/1/snapshot’ is part of the same file system loop as ‘/’.
/root/pxe
/root/xyx/pxe
/pxe
I do not want the /.snapshots/ to show up when find is run. Any suggestion?
snapshot dir is under /
test:~ # cd /
test:/ # ls -la
total 52588
drwxr-xr-x 1 root root 224 Apr 6 16:28 .
drwxr-xr-x 1 root root 224 Apr 6 16:28 ..
-rw-r--r-- 1 root root 0 Mar 30 15:03 .acce
drwxr-x--- 1 root root 38 Mar 20 12:25 .snapshots
-rwxrwxrwx 1 root root 26559432 Oct 14 12:23 pxe