[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



>  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

If you're willing to do some math:

find . -mtime -(day before) -mtime +(day after) -exec rm -i '{}' ';'

might be able to do -mtime day, never tried it

--attriel