I have a folder /home/testuser/log
which contain log files of one day old *.log
. I wish to compress all the log files older than one day to a single zip(gzip or tar.gz) and delete the older files.
I tried to pipeline find and tar commands but didn't work
Best Answer
Create tar.gz files older than one day logs
Delete older files [ Note:- if below find output is Correct then remove echo , after that it will delete those files]