I'm trying to make a script that checks the date of the files of different directories and if they are older than 7 days since the last update send me an email.
To begin with, I would like to know how I can extract the date from the files. I tried with ls -l | cut -f8 -d ' '
but I do not get all the dates.
I would also like to know how I can compare these dates with the current system date.