find utility behaves different in 5.2 and 5.3

Denis Antrushin DAntrushin at mail.ru
Thu Nov 4 08:11:32 PST 2004


Claus Guttesen wrote:
> Hi.
> 
> On 5.3 I can execute the following line in zsh:
> 
> odin~%>find . -type d \! -name autoedit -depth 1
> ./172
> 
> On a 5.2 I get:
> 
> cyclop~%>find . -type d \! -name autoedit -depth 1
> find: 1: unknown option
I don't know about version of find in 5.3, but for find in 5.2,
-depth option has no arguments. From man:

-depth  Always true; same as the -d option.  -depth can be useful when
         find is used with cpio(1) to process files that are contained in
         directories with unusual permissions.  It ensures that you have
         write permission while you are placing files in a directory,
         then sets the directory's permissions as the last thing.

> 
> According to 'man 1 find' (examples) I should be able
> to use \! -name on 5.2.
\! -name is OK

> 
> Zsh 4.2.0 on both machines.
> 
> Claus


More information about the freebsd-current mailing list