Re: delete n files in a directory

2001-06-16 Thread John R Lenton
On Sat, Jun 16, 2001 at 10:08:14AM +, 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),

Re: delete n files in a directory

2001-06-16 Thread Colin Watson
=?iso-8859-1?Q?M=E1rio?= Henrique Cruz =?iso-8859-1?Q?T=F4rres?= <[EMAIL PROTECTED]> 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 ? ls -1 | head -200 | xargs rm Be careful, though. Loo