bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

keep find from trying to spider directories where it has no permission


From: jidanni
Subject: keep find from trying to spider directories where it has no permission
Date: Wed, 16 Sep 2009 07:16:44 +0800

It seems there is no way to tell find to look before it leaps,

$ find /tmp -user $LOGNAME -type f -mtime +1 -exec rm {} \;
find: /tmp/mc-jidanni3: Permission denied
$ find /tmp -depth -user $LOGNAME -type d -empty -mtime +1 -exec rmdir {} \;
find: /tmp/mc-jidanni3: Permission denied

Is there any gentler way, or must one resort to 2>/dev/null ?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]