I have a bash script on a Solaris server to provide an alert if a file is in a folder location for longer than 5 minutes.
if [ -f $1 ] then a=0 else a=1
However, it is throwing a lot of false positives so I need to know how to add an additional filter when looking for a file to anything which was modified / created longer than 5 minutes ago.
If a file in x folder location is older than 5 minutes, I would like the script to report that.
This question is not the same as the "possible duplicate" as I am requesting assistance with Solaris Linux and that ticket is referencing MAC and Linux, the commands mentioned there are not working in my Solaris box!