Saturday, December 15, 2012

Linux: Remove all JPG files older than 5 days

 find . -name *.jpg -mtime +5 -print -exec rm {} \;

# starting from the current directory
# also print the file path

# note spaces around rm and {}

No comments: