1

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

view story
linux-howto

http://www.unix.com – I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the older files, but it creates only one gz file for all older file. But I need individual gz file for each log file. find /tmp/log/ -mtime +180 | xargs tar -czvPf /tmp/older_log_$(date +%F).tar.gz Thanking you in advance. Regards, Mallik (HowTos)