[vox-tech] Regular expression help

Gandalf Parker gandalf at community.net
Thu Jul 1 04:29:30 PDT 2010


On Wed, 30 Jun 2010, David Spencer, Internet Handyman wrote:

> rm -f auser/folder/new/127109228.file
> rm -f auser/folder/new/127110076.file
>
> Then I can just execute converted directory file as a shell script and
> delete my files. But I'm having a brain-freeze on what a valid regex would
> look like to match. Help??

Maybe list the directory by date of the file and grab the tail end of it?
Something like...
for fyl in `ls -1rt |tail `; do echo "rm -f $fyl" >>rm_log.txt; done
(bash shell version)

Gandalf  Parker



More information about the vox-tech mailing list