Hello all,
I need a little help creating a script that would go out to a certain directory(s) and remove files that are older than 14 days. Obviously would run it as a cronjob, but I'm a little rusty on the actual scripting.
Would it go something like this?
find /export/home/* -mtime +14 -maxdepth 0 -exec rm -rf {} \;
Any comments or suggestions would be greatly appreciated!
I need a little help creating a script that would go out to a certain directory(s) and remove files that are older than 14 days. Obviously would run it as a cronjob, but I'm a little rusty on the actual scripting.
Would it go something like this?
find /export/home/* -mtime +14 -maxdepth 0 -exec rm -rf {} \;
Any comments or suggestions would be greatly appreciated!