RE: 0 byte files removing


Subject: RE: 0 byte files removing
From: Peter Q. Olsson (olsson@koyukuk.at.uaa.alaska.edu)
Date: Wed Jan 08 2003 - 15:37:33 AKST


jon-

Though you have heard lots of different ways to solve this problem by now, it
would be negligent of us not to give a perl solution as well:

perl -e 'for(@ARGV){ -z and unlink }' *

removes all zero size (-z is true) files in the current directory. Perl, the
duct tape of the computer world...

pqo

jonr@destar.net <jonr@destar.net> [030108 11:29]:
>
> Is there a simple way to remove a directory full of 0 byte
> files? I have a directory that has some files I would like
> to keep that have file sizes but there are others that have
> no size in the same directory and I would like to remove them
> all at the same time rather than doing it one at a time.

    __________________________________________________________________
   | |
   | Dr. Peter Q. Olsson, |
   | Chief Scientist, Alaska Experimental Forecast Facility |
   | University of Alaska Anchorage |
   | 2811 Merrill Field Drive |
   | Anchorage, AK 99501 |
   | voice: (907) 264-7449 |
   | fax : (907) 264-7444 |
   | olsson@aeff.at.uaa.alaska.edu |
   |__________________________________________________________________|

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Wed Jan 08 2003 - 15:39:46 AKST