From: Alex Nord <alex_nord@jabil.com>
To: nobody@nowhere.org
Subject: Re: HELP with remove (rm)
Date: 1997/02/14 [thread overview]
Message-ID: <33048FE6.7286@jabil.com> (raw)
In-Reply-To: 3300ea4e.9049223@snews.zippo.com
Achachila wrote:
>
> Hi!
>
> Sorry but I am new to Digital Unix, could anyone tell me how can I rm
> 1000 of files without getting Arg. list to long?
>
> I need to rm something like *96*
>
> Thanks for any help
>
> Achachila
Following is a script I've had sitting around for quite a while.
I've kinda nicknamed it 'rmsome'. With it, I can also remove files
from, say, an entire month (rmsome Jan), or just a day (rmsome "Jan 21")
because of the -l listing on ls.
num=$RANDOM
ls -l | grep "$1" | cut -c55- > /tmp/kill.$num
while read i
do
rm $i
done < /tmp/kill.$num
rm /tmp/kill.$num
prev parent reply other threads:[~1997-02-14 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-11 5:00 HELP with remove (rm) Achachila
1997-02-13 5:00 ` Lee Doolan
1997-02-13 5:00 ` Phil Farrell
1997-02-13 5:00 ` Steve Jones
1997-02-14 5:00 ` Alex Nord [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox