I wrote a bash shell, and part of it is checked if the file is older than 30 days using the find command, unfortunately, when I uploaded it to my host, it did not work as the find command was blocked.
Does anyone know how to check if a file is longer than 30 days without the find command?
I think I need to do "ls -a $ filename", then parse the date string, convert it to unix date, and then compare it to today's date, but I'm very rusty on unix.
thank
source
share