[ale] THANKS to all who replied to "ls -rt | rm -i" problem, BUT...ATTN:JoeKnapka
Joe Knapka
jknapka at kneuro.net
Sat Mar 18 15:08:28 EST 2006
Courtney Thomas wrote:
> Thanks Joe.
>
> Exactly what I was lookin' for.
>
> I should ask though, how'd you come up with "-f 9" in cut ?
Experimentation. I tried -f 8 first (counting the
fields left-to-right in the 'ls -l' output), but
found that it gave me the previous field. So I
tried -f 9, which worked.
Note Geoffrey's comment that my command won't work
if there are file names containing spaces.
Cheers,
-- JK
> 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)
>>
>>Per another comment, there doesn't seem to be
>>a standard way to find out a file's creation date.
>>
>>Cheers,
>>
>>-- JK
>>
>>Courtney Thomas wrote:
>>
>>
>>
>>>From a shell prompt, I can now sort a directory and then interactively
>>>remove it's files. Thank you.
>>>
>>>I remain unable to filter the sorted list by date, the "sort +5" field
>>>specifically, before selecting those to rm.
>>>
>>>Goal: show me the files of xx/yy/zz and let me choose whether to rm each
>>>
>>>Thanks once more,
>>>
>>>Courtney
>>>_______________________________________________
>>>Ale mailing list
>>>Ale at ale.org
>>>http://www.ale.org/mailman/listinfo/ale
>>>
>>>
>>
>>
>>
>>_______________________________________________
>>Ale mailing list
>>Ale at ale.org
>>http://www.ale.org/mailman/listinfo/ale
>>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
>
More information about the Ale
mailing list