Hello, On Fri, 17 Jan 2020, Carlos E. R. wrote:
find "$DONDE" -type f \ -prune -o -path '/var/spool/news' \ [..] -prune -o -path '/data/waterhoard/backup' \ > $LISTADO_FIND
Yet when it runs it spits:
find: '/data/waterhoard/backup/partimag/AmonLanc/etc/apache2/ssl.key': Permission denied [..] So prune is not doing what I thought it would do. How can I tell find to not search those directories?
You're using it wrong! ;) ==== man find ==== EXPRESSION [..] An expression is composed of a sequence of things: Tests [..] Actions [..] [options] [Operators] [..] TESTS [..] -path pattern -type c [..] ACTIONS [..] -print [..] -prune [..] ==== So what you're doing is -pruning the matches for '-type f', then each following '-path' but not the last. Use this: ==== find "$DONDE" \ -path '/var/spool/news' -prune \ [..] -o -path '/data/waterhoard/backup' -prune \ -o -type f -print > "$LISTADO_FIND" ==== This is _slightly_ different from find "$DONDE" -type f -path '/var/spool/news' -prune \ [..] -o -path '/data/waterhoard/backup' -prune \ -o -print which probably is not what you're looking for. HTH, -dnh -- Why oh why did I remember that? Bad brain. Naughty brain. -- JoeB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org