I'd like to write a shell script in ksh or bash which exits with 1 if a specific file is older than 30 minutes. (Last modification time is older than half hour). It would be easy on a Linux or a modern unix, but I have to do it on AIX 5.2 version.
So the constraints:
- there is no -mmin -mmax options in 'find'
- there is no -d option in touch (touch -d '30 minutes ago' temp then find ! -newer temp doesn't work)
- there is no 'stat' command
- there is no %s parameter in the 'date' command (date +%s doesn't work)
- I'm not allowed to install any software
Could you please help how can I do it with these constraints?