Subject: Re: Samba's smbclient and NetBSD's find
To: None <claude.marinier@dreo.dnd.ca>
From: Giles Lean <giles@nemeton.com.au>
List: netbsd-help
Date: 03/02/2001 06:30:46
> Samba's smbclient uses the "-depth" option for the find command used to
> handle mput and mget. Our version of find does not have this option. I did
> not find the equivalent in the man page (I may have missed it).
Yes, it has it:
find -depth /wherever ...
It is documented as the '-d' option. See thse sections of the manual
page:
DESCRIPTION
...
-d The -d option causes find to perform a depth-first traversal,
i.e. directories are visited in post-order and all entries in a
directory will be acted on before the directory itself. By de-
fault, find visits directories in pre-order, i.e. before their
contents. Note, the default is not a breadth-first
traversal.
...
STANDARDS
...
Historically, the -d, -h and -x options were implemented using the pri-
maries ``-depth'', ``-follow'', and ``-xdev''. These primaries always
evaluated to true. As they were really global variables that took effect
before the traversal began, some legal expressions could have unexpected
results. An example is the expression ``-print -o -depth''. As -print
always evaluates to true, the standard order of evaluation implies that
-depth would never be evaluated. This is not the case.
...
Regards,
Giles