The following bash script works fine to delete all files that are
older than $1 minutes. To execute this script,
bash cleanup +10
find /mypath -type f -cmin $1 -exec rm -f {} \;
Unfortunately, now I just realize I need to make it work in Korn
Shell. Even I
change the header from #!/bin/bash to #!/usr/bin/ksh, and execute the
script by ksh cleanup +10, it still have
different errors:
cleanup[9]: -cmin: not found.
cleanup[10]: -type: not found.
Looks like it doesn't work anymore. I think I need to re-write the
Korn Shell script that do the task.
I tried to search for equivalent Korn shell commands but unsuccessful.
Please help. thanks!!