[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using the 'find' program

Angelo Bertolli wrote:
> Stephen R Laniel wrote:
> > Incidentally, I think '-print' is superfluous; I'm pretty
> > sure the default is to print.
> Yes, I think so too, but I do recall being on some UNIX's where this was 
> not the case.

The classic legacy find from AT&T UNIX V7 did not default to -print by
default.  If you did not specify an action then no action was
performed by default.  So in the old days if you wanted print you
needed to specify it.

POSIX changed this and now requires:

  If no expression is present, -print shall be used as the expression.
  Otherwise, if the given expression does not contain any of the
  primaries -exec, -ok, or -print, the given expression shall be
  effectively replaced by:

  ( given_expression ) -print

Also the rules surrounding the -print seem confuse people.  I don't
know why but only say that based upon history of it doing so.


Attachment: signature.asc
Description: Digital signature

Reply to: