Delete empty files, older than x days

Oct 11th, 2008

Q: How do I delete files that older than a certain amount of days and which are empty

A: find . -empty -type f -mmtime +X | xargs rm or for those fancing exec, use find . -empty -type f -mmtime +X -exec rm {}

** X must be replaced with the number of days

cheers,

Tags: ,
No comments yet.