RegularJoe
Patron
- Joined
- Aug 19, 2013
- Messages
- 330
Hi All,
It seems that cron or zsh is kicking my butt.
I never want to delete the file "File Exchange Area - 10 day storage.txt"
I never want to delete the folder "File Exchange Area - 10 day storage"
I only want to delete folders that are empty and older than 10 days
I do not want to delete a nested folders that have data
find /mnt/FileServerPub/shares/public -type f -mtime +10 -exec rm {} \;
find /mnt/FileServerPub/shares/public -type d -mtime +10 -exec rm {} \;
Is it better to just create a script, if so where to store the script so that upgrades do not delete it?
Thanks,
Joe
It seems that cron or zsh is kicking my butt.
I never want to delete the file "File Exchange Area - 10 day storage.txt"
I never want to delete the folder "File Exchange Area - 10 day storage"
I only want to delete folders that are empty and older than 10 days
I do not want to delete a nested folders that have data
find /mnt/FileServerPub/shares/public -type f -mtime +10 -exec rm {} \;
find /mnt/FileServerPub/shares/public -type d -mtime +10 -exec rm {} \;
Is it better to just create a script, if so where to store the script so that upgrades do not delete it?
Thanks,
Joe