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: [users] delete n files in a directory

2001-06-16 Thread MaD dUCK
also sprach Mário Henrique Cruz Tôrres (on Sat, 16 Jun 2001 10:08:14AM +): > 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 echo rm when you made sure that the command lin

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

delete n files in a directory

2001-06-16 Thread Mário Henrique Cruz Tôrres
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. Thank's a lot MArio H.C.T.