Quantcast
Channel: Move files to another directory which are older than a date - Server Fault
Viewing all articles
Browse latest Browse all 6

Answer by cuonglm for Move files to another directory which are older than a date

$
0
0

You can use this command, and specify that you only find for files, not directory, and the file is older than one year

find /sourcedirectory -type f -mtime +365 -exec mv "{}" /destination/directory/ \;

Viewing all articles
Browse latest Browse all 6

Trending Articles