From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from netsonic.fi ([194.29.192.20] helo=nalle.netsonic.fi ident=root) by speech.braille.uwo.ca with esmtp (Exim 3.35 #1 (Debian)) id 17F7MX-0000FB-00 for ; Tue, 04 Jun 2002 02:00:09 -0400 Received: from thp.local (qmailr@wanda69.adsl.netsonic.fi [81.17.192.69]) by nalle.netsonic.fi (8.10.1/8.10.1) with SMTP id g54606024795 for ; Tue, 4 Jun 2002 09:00:06 +0300 Received: (qmail 21302 invoked from network); 4 Jun 2002 06:00:05 -0000 Received: from nkl.local (qmailr@192.168.2.4) by gw.local with SMTP; 4 Jun 2002 06:00:05 -0000 Received: (qmail 31922 invoked by uid 1013); 4 Jun 2002 06:00:00 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 4 Jun 2002 06:00:00 -0000 Date: Tue, 4 Jun 2002 08:59:58 +0300 (EEST) From: Ari Moisio X-X-Sender: armoi@nkl.local To: speakup@braille.uwo.ca Subject: Re: Deleting all empty files with a single command? In-Reply-To: <007101c20b70$49fdaec0$a06fe9d5@microsoft.com> Message-ID: X-PGP-KeyID: 0x3FAF0F05 X-PGP-Key-fingerprint: 8A 91 96 E2 98 64 D0 4D 57 5E 3E EE 72 E9 DD D2 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) Sender: speakup-admin@braille.uwo.ca Errors-To: speakup-admin@braille.uwo.ca X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: speakup@braille.uwo.ca X-Reply-To: armoi@sci.fi List-Help: List-Post: List-Subscribe: , List-Id: Speakup is a screen review system for Linux. List-Unsubscribe: , List-Archive: Hi! Octavian Rasnita 03.06.02: >I want to delete all empty files from a directory with a single command. >What switch should I use to "select" all the empty files? In command line you can write: find . -maxdepth 1 -type f -size 0 -exec rm {} \; ...well: find is a command to find files for certain criteria. First dot means start from current directory, -maxdepth 1 means not recursing into subdirectories, -type f means only ordinary files, -size 0 is quite obvious and -exec will launch rm to erase file if all previous conditions are met. {} in exec is replaced by file name and \; means end of -exec command. To see more options see find man page:-) -- Mr. Ari Moisio, Niittykatu 5, 41160 Tikkakoski, +358-40-5055239 ari.moisio@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05