Re: Question about find - excluding directories

2012-10-14 Thread Matthew Seaman
On 15/10/2012 01:32, Paul Schmehl wrote: > 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 \( -typ

Question about find - excluding directories

2012-10-14 Thread Paul Schmehl
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 par