You are not logged in.
I'm looking for a way to do an automated search for file and directory permissions that are other than expected.
Is there a way to do this without poring over every directory listing? I feel sure there must be.
I imagine I could use grep to look for a particular permission set, but what I really want to do is flag any file and directory that has permissions which are unlike others in the "neighborhood" (pardon the technical term there).
Or is there a better way to do this?
The problem I'm trying to address is that I've occasionally set on-the-fly permissions for a given directory or file without necessarily going back and reverting to the default permissions. I want to fix that.
Thanks.
Offline
Check out "find", specifically the -perm predicate.
Offline
Check out "find", specifically the -perm predicate.
Thanks, tam1138. I'll play with that ASAP.
Offline
Not sure if this is what you wanted, but I would simply try
ls -lr * | sort (or some suiting egrep respecively)
and then look at the permissions in question successively.
To know or not to know ...
... the questions remain forever.
Offline