Hello, On Tue, 29 Apr 2014, Carlos E. R. wrote:
El 2014-04-28 a las 03:07 +0200, David Haller escribió:
On Sun, 27 Apr 2014, Carlos E. R. wrote:
Some of those directories were supposedly excluded: You've got '-prune' backwards. It should be:
find "$DONDE" \ -path "/var/spool/news" -prune \ -o -path '/var/run/udev/links' -prune \ ... -o -path "/proc" -prune \ -o -type f -print
Ah... :-)
Let's try, with a reduced search for testing:
minas-tirith:~ # find /var/run -path /var/run/udev/links -prune find: '/var/run/user/1000/gvfs': Permission denied /var/run/udev/links minas-tirith:~ #
Nope. Ok, let's try again:
minas-tirith:~ # find /var/run -path /var/run/udev/links -prune -o -type f -print /var/run/dhclient-enp0s29f7u1.pid /var/run/atd.pid /var/run/suspend.grubonce.default /var/run/pm-suspend /var/run/pm-utils/pm-suspend/storage/state:cpu1_governor /var/run/pm-utils/pm-suspend/storage/state:cpu0_gover ...
Right, that's it :-)
Why is "-print" needed?
I think it is because "If no expression is given, the expression -print is used" (I think that should be "action" in both cases, as 'find . -type f' has an expression, but no action, and the default kicks in)) and you have an expression (rather "action" "-prune"). That you have no "action" for the "-o -type f" is your fault ;) Why /v/r/udev/links is printed in the first example is beyond me. Maybe a bug.
minas-tirith:~ # find /var/run -path /var/run/udev/links -prune -o -type f | wc -l find: '/var/run/user/1000/gvfs': Permission denied 476 minas-tirith:~ # find /var/run -path /var/run/udev/links -prune -o -type f -print | wc -l find: '/var/run/user/1000/gvfs': Permission denied 475 minas-tirith:~ #
Just one line less... which one?
Heh!
minas-tirith:~ # diff p1 p2 207a208
/var/run/udev/links minas-tirith:~ #
Precissely that one! Ok, so I need that "-print", but I don't understand why it has that effect... :-?
Probably a bug ;) Don't worry about it, just _always_ use -print and give '.' as the search-path, then your stuff will also work with other finds. HTH, -dnh -- Carter: Sir, I've been thinking. O'Neill: I'd be shocked if you ever stopped, Carter. -- Stargate SG-1, 5x05 - Red Sky -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org