I would like to write a small script that would look for backup and text files in a specific directory that are older than 1 day and the delete these files.
Can anyone help me with my script?
This is what I have put together:
find /path/to/directory -name *.bak *.txt -ctime +1 -exec rm {};
However there is something wrong with my script.
Any ideas?
Best regards
Can anyone help me with my script?
This is what I have put together:
find /path/to/directory -name *.bak *.txt -ctime +1 -exec rm {};
However there is something wrong with my script.
Any ideas?
Best regards