Cleaning up files

Posted by admin on Jul 21, 2009 in perl |

This is a quick perl one liner to delete files older than 3 days

map { unlink $_ if -M > 3 } glob ("old_path/*.bak");

Tags:

Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright © 2008-2018 Brinsmead Data Services All rights reserved.