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