I am working on a script that, among other things, extracts a list of all items in a directory (files and subdirs) for archival but it needs to skip remote symlinks (i.e. on other file systems). The script was migrated from Solaris where
find . -mount seems to have excluded symlinks to other file systems.
The find man page for
-mount Don't descend directories on other filesystems. An alternate name for -xdev, for compatibility with some other versions of find.
-xdev but that didn't work either.
As a result of the difference, my remote symlinks get deleted.
Any idea how I can fix this as a one-liner to eliminate remote symlinks from being returned?