-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 17/01/2020 20.23, David Haller wrote: | 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! ;) I know I am, but not why, that's why I ask :-D | | ==== 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. AHH! | | Use this: | | ==== find "$DONDE" \ -path '/var/spool/news' -prune \ | [..] -o -path '/data/waterhoard/backup' -prune \ -o -type f -print | > "$LISTADO_FIND" ==== I see. Indeed, it is different. | | 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. Thanks. Trying. [...] Seems to be working. Found 845143 files, way faster than previously (a minute or so). The next step in the script finds out which of those are bash scripts. That takes long :-) - -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXiIONAAKCRC1MxgcbY1H 1SD8AJ9rz0wsc3krAqPqNwYvq1s8sh5iJwCeONZ/cvPvvTUKsnlbcVaF6RBlDmQ= =fCVt -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org