*BSD News Article 69852


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!disco.iinet.net.au!news.uoregon.edu!newsfeed.internetmci.com!solaris.cc.vt.edu!news.bluesky.net!usenet
From: Brian.Oxley@NOVASOFT.COM (B. K. Oxley (binkley) <Brian.Oxley@Novasoft.COM>)
Newsgroups: comp.unix.bsd.freebsd.misc,comp.lang.perl.misc
Subject: Re: Deleting Empty Files
Date: 31 May 1996 13:29:00 -0400
Organization: Novasoft Systems, Inc.
Lines: 17
Sender: binkley@gateway.novasoft.com
Message-ID: <wvx20k07nvn.fsf@gateway.novasoft.com>
References: <31ab29fe.17230986@news.hq.af.mil> <31ACEB04.136A@fsl.noaa.gov>
	<ukviheigh0.fsf@julie.teleport.com>
Reply-To: "B. K. Oxley (binkley)" <Brian.Oxley@NOVASOFT.COM>
NNTP-Posting-Host: gateway.novasoft.com
In-reply-to: merlyn@stonehenge.com's message of 30 May 1996 03:48:59 -0700
X-Newsreader: Gnus v5.1
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:20411 comp.lang.perl.misc:26861

>>>>> "RLS" == Randal L Schwartz <merlyn@stonehenge.com> writes:
In article <ukviheigh0.fsf@julie.teleport.com> merlyn@stonehenge.com (Randal L. Schwartz) writes:

>>>>> "Sean" == Sean Kelly <kelly@fsl.noaa.gov> writes:
 Sean> Scott Gregory wrote:
 >>> Is there a utility or script that will delete files that are
 >>> empty??

 Sean> find <options> <dirs> -size 0 -type f | xargs rm -f

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

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

Which doesn't expand or interpret the filenames?

--binkley