[ILUG] solaris find
Kevin Dobey
kevin.dobey at trintech.com
Wed Apr 26 17:26:06 IST 2000
> > well, "find . -name <filename>" always does it for me.
>
> On Solaris, unless you specify the "-print" option, this will
> do nothing
> except trash your disk.
>
> Nick
Not always true. (Yes -print is always evaluated as true but i means you
don't always need it).
Perhaps it's a configurable thing but.
On Certain version of certain' nix's you need the -print (or -ls - or even
-l [only sco i think]) before you see any output.
AFAIK on AIX 3.x you NEED to put in a -print (or equivalent) where as on 4.x
you don't need it at all.
And on SunOS 5.5.1 you don't need the -print.
and probably there is still occasion not to use a -print if you like - never
tried it but i guess find / -exec rm {}; [1]
would still work - and it would really trash you disk (in every sense of the
word).
Of course correct me if I am wrong.
Rgds
Kevin
[1]Or what ever the correct syntax is[2]
[2]i'm an xargs man myself[3] so i woun't know
[3] except in cases where it's more fun to do it with awk[4]
[4] Mr. Lyda will know what i mean.
> -----Original Message-----
> From: Nick Hilliard [mailto:nick at iol.ie]
More information about the ILUG
mailing list