I want to use find to locate files that don't belong to a certain user but should belong to that user. But there are subdirectories I want to exclude.

I have tried using this, but it doesn't work:

find /path/to/dir -type d ! -uid num \( -type d ! -name dirname -prune \)

If I leave off the part in parentheses, it finds all the files I'm looking for but also files in the subdirs I'm not interested in.

If I add the parentheses, it doesn't find any files at all.

This is FreeBSD 8.3 RELEASE.

So how can I find these files without descending into directories I'm not interested in?

Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to