On Sat, Jun 16, 2001 at 10:08:14AM +0000, Mário Henrique Cruz Tôrres wrote: > Good morning everyone. I wan't know if can I delete the first 200 > files ( in alphabetical order ) in a directory wich have > 300 files ? > I'm using bash shell.
you can use xargs (as you've been told already), but I find it's
a pain when you have filenames with spaces, apostrphes, stuff
like that. I'd probably do something like
j=0; for i in *; do j=$((j+1)); rm -v "$i"; [ $j -eq 200 ] && exit; done
--
John Lenton ([EMAIL PROTECTED]) -- Random fortune:
SCCS, the source motel! Programs check in and never check out!
-- Ken Thompson
pgpcwqFn3fmjU.pgp
Description: PGP signature

