find and archive files older than 90 days

Just another note to myself here- more pics of Gabe are sure to be on the way.

Find the log files older than 90 days and gather them up in a compressed archive:

find /path/to/my/logs -mtime +90 -name "*.log" | xargs tar -cvf my_logs.tar | gzip > my_logs.tar.gz

This entry was posted in computers/programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *