[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: OT: find command permissions: how to exclude dir?

Joe Smith wrote:
Dave Burns wrote:
Not sure if it is a bug in find or gvfs, but -xdev and -mount do not
help with this problem.

I've never seen these options work, ever. I sure would like to know why, or what I'm doing wrong, it would be handy to be able to use them.

That depends on what you're trying to do with them. In order to determine whether a directory is on the same filesystem, find attempts to stat() the directory. If it doesn't have read permission, it'll spit out an error and continue, which is what it's doing in this case. There is no bug. This is the way that it's supposed to work.

If you do have read permission to the subdirectory, and the subdirectory is a different filesystem, then find will not search that directory for matching files. If you've ever seen find return results from a directory that it wasn't told to search when using -xdev or -mount, then that would be a bug. I've never seen find misbehave in that way, though.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]