*BSD News Article 69872


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!solace!nntp.uio.no!news.cais.net!bofh.dot!news.structured.net!nntp.teleport.com!usenet
From: merlyn@stonehenge.com (Randal L. Schwartz)
Newsgroups: comp.unix.bsd.freebsd.misc,comp.lang.perl.misc
Subject: Re: Deleting Empty Files
Date: 31 May 1996 14:17:14 -0700
Organization: Stonehenge Consulting Services; Portland, Oregon, USA
Lines: 18
Sender: merlyn@julie.teleport.com
Message-ID: <ukg28gr19i.fsf@julie.teleport.com>
References: <31ab29fe.17230986@news.hq.af.mil> <31ACEB04.136A@fsl.noaa.gov>
	<ukviheigh0.fsf@julie.teleport.com>
	<wvx20k07nvn.fsf@gateway.novasoft.com>
Reply-To: merlyn@stonehenge.com
NNTP-Posting-Host: julie.teleport.com
In-reply-to: Brian.Oxley@NOVASOFT.COM's message of 31 May 1996 13:29:00 -0400
To: "B. K. Oxley (binkley)" <Brian.Oxley@NOVASOFT.COM>
X-Newsreader: Gnus v5.0.15
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:20418 comp.lang.perl.misc:26890

>>>>> "Brian" == Brian Oxley@NOVASOFT COM (B K Oxley (binkley) <<Brian.Oxley@Novasoft.COM>)> writes:

Brian> Why would you do this in the first place?  Why not:

Brian>   $ find <options> <dirs> -size 0 -type f -exec rm -f \{\} \;

Brian> Which doesn't expand or interpret the filenames?

Why would you want to launch a separate rm process for every file to
be blown away?

See my perl solution (already posted) for the one-process way.
-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.teleport.com/~merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me