hello everyone.
in /opt/abc every night there is a new folder created. in that folder there is aseries of files created for that day.
i would like to run a script every Sunday night at 02:00 to compress each file separately (preserving its name) who is older than 2 days.
i have found this command
find /opt/abc/ -mtime +2 | xargs tar -czvPf /opt/older_log_$(date +%F).tar.gz
but i do not know how to edit it to make suitable for my needs. I would appreciate any help available.
Thanks in advance.