in reply to Deleting old files from directory
If you are using unix/linux, then an alternative way to find and delete old files is with find and xargs:
find <directory> -type f -ctime +10 -name "*some*pattern*.txt" | xargs rm -fI have fragments like that in the crontab for the systems I maintain, as it is very easy to setup and then just leave to run for ever.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Deleting old files from directory
by reisinge (Hermit) on Sep 27, 2011 at 20:37 UTC | |
by chrestomanci (Priest) on Sep 28, 2011 at 08:57 UTC | |
Re^2: Deleting old files from directory
by i5513 (Pilgrim) on Sep 27, 2011 at 20:21 UTC | |
Re^2: Deleting old files from directory
by Anonymous Monk on Sep 27, 2011 at 22:56 UTC |
In Section
Seekers of Perl Wisdom