Thursday, February 7, 2008

unix find - seach based on permissions

All the files in the current directory that does not have a write permission for user and group

find . -not -perm -ug=w

All files owned by 'ssinghal'

find . -owner ssinghal

2 comments:

ruffact said...

This was very useful, thnx.

In some OS's as HP-UX itanium 64, '-not' doesn't work so I use '!' instead.

find . ! -perm -a=r

Anonymous said...

Great. Just what I needed. Thanks!