Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!usenet.eel.ufl.edu!bofh.dot!newsfeed.internetmci.com!in2.uu.net!news.gtn.com!knobel.gun.de!usenet From: andreas@knobel.gun.de (Andreas Klemm) Newsgroups: comp.unix.bsd.freebsd.misc,comp.lang.perl.misc Subject: Re: Deleting Empty Files Date: 29 May 1996 11:52:53 GMT Lines: 24 Message-ID: <4ohdql$8o@knobel.gun.de> References: <31ab29fe.17230986@news.hq.af.mil> NNTP-Posting-Host: knobel.gun.de X-Newsreader: knews 0.9.6 In-Reply-To: <31ab29fe.17230986@news.hq.af.mil> To: sgregory@pubspo.hq.af.mil (Scott Gregory) Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:20281 comp.lang.perl.misc:26571 In article <31ab29fe.17230986@news.hq.af.mil>, sgregory@pubspo.hq.af.mil (Scott Gregory) writes: >Is there a utility or script that will delete files that are empty?? > >I have a script that creates an empty file if it doesn't get any >input. I am pipeing ls to another script, but I don't want empty >files included. > >Any help would be appreciated. man test -s file True if file exists and has a size greater than zero. So you can write a shellscript using this test operator. Andreas /// -- andreas@klemm.gtn.com /\/\___ Wiechers & Partner Datentechnik GmbH Andreas Klemm ___/\/\/ Support Unix -- andreas.klemm@wup.de pgp p-key http://www-swiss.ai.mit.edu/~bal/pks-toplev.html >>> powered by <<< ftp://sunsite.unc.edu/pub/Linux/system/Printing/aps-491.tgz >>> FreeBSD <<<