0

As my disk space is less , i would need to zip and archive the logs in another directory which are older than 30 days.

Can someone please modify the below command to zip the 30 days older files and move it to destination folder.

find . -name 'server.log*' -mtime +30 -exec zip -r /home/user/Logs/ /opt/apps/log {} \;

where server.log is a log file and there will be many logs with datestamp attached like this server.log_290719.
/home/user/Logs is destination folder and /opt/apps/log is source folder.

cmak.fr
  • 8,976
ABD
  • 1

0 Answers0