On 3/4/2018 8:30 PM, Bruce Evans wrote: > On Sun, 4 Mar 2018, Ian Lepore wrote: > >> On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: >>> >>> Log: >>> \xa0 chflags: Add -x option to not traverse mount points. >> >> Yay! \xa0One day later than I needed it, but still, yay! > > I recently noticed that find(1) needs an option to not look at mount > points at all, and further options to classify mount points so that > you can prune them. > > After reading the above and investigating further, I noticed that -x > is broken in most FreeBSD utilities, since POSIX requires not looking > at mount points at all for the few utilities that support -x. E.g., > for du in 2001 draft 7 POSIX: > > 12578 -x When evaluating file sizes, evaluate only > those files that have the same device as > 12579 the file specified by the file operand. > 12580 Specifying more than one of the mutually-exclusive > options -H and -L shall not be considered
Yes I'm quite annoyed that my workaround for chflags not having -x, using `find -x ... -exec chflags`, is still trying to modify mountpoints but not descending into them. > > Mount points are on a different device, but FreeBSD du -x is broken by > using FTS_XDEV and not filtering out the mount points. Linux du -x > (an old version in /compat/linyx/usr/bin) works correctly. -- Regards, Bryan Drewery
signature.asc
Description: OpenPGP digital signature