[ale] THANKS to all who replied to "ls -rt | rm -i" problem, BUT...ATTN:JoeKnapka

Paul Cartwright paul_tbot at pcartwright.com
Sat Mar 18 12:57:09 EST 2006


On Sat March 18 2006 12:50 pm, Courtney Thomas wrote:
> I should ask though, how'd you come up with "-f 9" in cut ?
>
> Courtney
>
> Joe Knapka wrote:
> > Hi Courtney,
> >
> > This worked for me just now, to interactively
> > remove files modified on March 15:
> >
> > rm -i $(ls -l | grep 'Mar 15' | cut -d ' ' -f 9)

cut -d means delimited by , ' ' means the delimiting factor is a space
-f 9 means the 9th field

so I'm guessing the 9th field would be the name of the file from this 
ls -l output..

-rwxr-xr-x   1 root root       6552 2005-09-12 19:47 zvbi-chains


-- 
Paul Cartwright
Registered Linux user # 367800
 X-Request-PGP: http://home.bellsouth.net/p/PWP-pcartwright/key.asc



More information about the Ale mailing list