|
|
Jim Henderson <nos### [at] nospamcom> wrote:
> On Sat, 08 Mar 2008 17:44:45 -0500, Warp wrote:
> > Jim Henderson <nos### [at] nospamcom> wrote:
> >> cd /tmp/stuff; find -type f | grep tmp$ | awk '{system("rm \"" $0
> >> "\""))'
> >
> > Why does it need to be so complicated?
> >
> > find /tmp/stuff -name "*.tmp" -exec rm {} \;
> Because there's a million ways to do it, and I haven't memorised all the
> options for the find command.
> In the time that it would take me to look up the options for find, I've
> written the command-line out.
But now you know. The -exec option of find is actually quite useful.
Learn to use your tools. :)
--
- Warp
Post a reply to this message
|
|