Joerg Schilling <joerg.schill...@fokus.fraunhofer.de> wrote, on 14 Sep 2018: > > From the Solaris man page: > > -mount Always true. Restricts the search to the file system > containing the directory specified. Does not list > mount points to other file systems. > > -xdev Same as the -mount primary. > > FTW_MOUNT If set, nftw() reports only files in the same file system > as path. If clear, nftw() reports all files encountered > during the walk. [...] > > Consistency between find and pax should be a consideration, so it would > > be good to find out what the various pax implementations do here. > > I tried Solaris, HP-UX, macOS and Debian stretch (the "pax" package) > > and they all wrote the mount point to the archive. > > I believe we rather need a new flag for nftw() that includes a mount point > and > a new primary for find(1) that includes the mount point. I believe that the > current POSIX text is a bug since I expect that it's intend was to be > compatible to the SVr4 find(1) behavior that is aligned with and based on > nftw().
Perhaps an acceptable solution would be: Add -mount to find with behaviour matching nftw() FTW_MOUNT. Add FTW_XDEV to nftw() with behaviour matching find -xdev and pax -X. Make it clear that find -xdev acts on the mount points and -mount does not. (No need to add anything to pax since you can use find ... -mount | pax if you want the mount points excluded.) -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England