On Oct 20, 2007 1:08 AM, Wayne Pollock <[EMAIL PROTECTED]> wrote: > For -perm: > You can't easily find files with odd combinations of > permissions, such as files with more access for group > members than the owner/user, or more for others than > for group members.
True. I would suggest that you use a scripting language such as Perl, Python, etc. for this. This also allows you to check other things too. The machine I am writing this on has about a million files on it. You might find it efficient to do one pass with find and analyse the data after the fact. > I would like to see the syntax extended to allow something > like: > -perm -u-r,g=r -o -perm -g-r,o=r > Currently I don't believe find allows 'u-r". It's allowed and has the POSIX required semantics I think (that is, no effect in this case I think). Perhaps you meant \! -perm -u+r > I think this > should be allowed, with the meaning of "-perm -u-r,g=r" > to be "user read is off, group read is on, other permission > bits can be anything". I think that would be "-perm -g+r \! -perm -u+r". > For time comparisons: > To check for files with invalid, future dates, you must > currently create a file first, then use "-newer", then > delete the file. > This doesn't work well in this case, as you can only test > the mtime of the files. One possible fix would be to add > -anewer and -cnewer (and maybe -mnewer, for completeness). > > However when searching a large filesystem for such files, > find many take several seconds or minutes. Thus this test > shows many false positives (all files modified since the > temp file was created). > > I would like to have a way to compare a file with the current > time. I don't know the best way to allow this, perhaps a > special string "NOW" in place of the filename, or perhaps > a new test -future or -newernow or even -badtimestamp? Why not just use -newermt (findutils 4.3.2+)? James.
