🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1396

Re: Why use find? (Was: Can U pipe filenames to rm???)

#1396
From: David Elliott
Date: Sat, 06 Oct 1990 05:51
16 lines
1238 bytes
In article <1990Oct5.145825.9454@diku.dk> kimcm@diku.dk (Kim Christian Madsen) writes:
>>Why use `xargs' when you don't need to ?
>
>There are a lot of uses of xargs that are superior to using find with the
>exec option. Find is *SLOW*, so if you have the names of files you want to
>do something with in a file or pipe use xargs for performance.

I think you mean that fork()/exec() is slow.

Find itself is quite reasonable, since it precompiles the predicates
and then runs down the filesystem tree.  Piping to xargs lets find do
the job it does best very quickly.

You're right about it being complicated, though.  Writing interpreted
language syntax on a command line without any newlines can be pretty
messy.
Technical Details
Message-ID: <1990Oct6.055108.14853@smsc.sony.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!smsc.sony.com!dce
References: <1990Sep30.182331.14363@iconsys.uucp> <941@hls0.hls.oz> <1990Oct5.145825.9454@diku.dk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!smsc.sony.com!dce
From: dce@smsc.sony.com (David Elliott)
Newsgroups: comp.unix.shell
Subject: Re: Why use find? (Was: Can U pipe filenames to rm???)
Message-ID: <1990Oct6.055108.14853@smsc.sony.com>
Date: 6 Oct 90 05:51:08 GMT
References: <1990Sep30.182331.14363@iconsys.uucp> <941@hls0.hls.oz> <1990Oct5.145825.9454@diku.dk>
Organization: Sony Microsystems Corp, San Jose, CA
Lines: 16