Categories
Linux

How to move files that are older then x days in linux

I found this useful:
sudo find ./* -mtime +2 -exec mv {} /hosting/dropbox/ops/user/client/ \;
breakdown…
./* is the current directory, including all files, but you could use full path.
mtime +2 is 2 days old
mv is the command being executed
and after the brackets is the directory the files are moving to

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.