Linux equivalent to QNX's ws (walk directory structure) command?

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Fri Jan 6 03:58:58 UTC 2006


On Thu, 5 Jan 2006, D. Hugh Redelmeier wrote:

> | From: G. Matthew Rice <matt-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>
>
> |        find <somedir or 2> -type d (maybe -depth)
> |
> | and then pipe that to xargs(1) or use the -exec option with find.  I usually
> | prefer xargs(1).  Especially if there are a lot of matches.
>
> xargs is very useful.  Too bad there isn't an xargs built into find.
> It would have the advantage of being more concise and it would avoid
> the following problem.

      The POSIX specification for find (which is implemented in the
      most recent GNU version) can use + instead of \; to terminate an
      -exec command. When terminated by +, -exec builds as long a
      command line as possible, just as xargs does. This makes xargs
      obsolete.

-- 
    Chris F.A. Johnson                      <http://cfaj.freeshell.org>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list