find

GNU find command line utility
Aug 31 2010

Move old files to another directory with find

This example shows how to move a large number of files to another directory:


find /var/www/userpics -name '*.jpg' -mtime +31 -print0 | xargs --null mv --target-directory=/backup/oldpics/