how to find 4 year old directories in ubuntu code example
Example 1: delete old files linux
find /opt/backup -type f -mtime +30 -exec rm -f {} \;
Example 2: delete logs older than 7 days linux
find /media/bkfolder/ -mtime +7 -name'*.gz' -exec rm {} \;