Quote:
Originally Posted by pochaw
Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is:
find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \;
But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy hidden file in such folders which are not to be considered when this script is run.
Is this the right way to achieve the desired result???
If yes, then how can I do this??
If not, then what should be the ideal way??
Please.I need the solution urgently..
Thanx.
|
Can you show a sample of the <filename_pattern> and that of the important files.