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

Move files to another directory which are older than a date

$
0
0

I am looking for a solution to move files that are year older from today. My log partition is getting full, but I can not remove them. They are needed for a long long time. Anyway one solution I came up with is:

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

Would this work? Asking because of the "-mtime 365" would this move the files that are year older from today to a new location?

Thank you!


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>