Hi,
Iam trying to delete 6 months old files.
Iam using the following script
-ctime +190 -type f -exec echo rm {} \;
Iam getting an error saying -ctime not found.
Hi,
Iam trying to delete 6 months old files.
Iam using the following script
-ctime +190 -type f -exec echo rm {} \;
Iam getting an error saying -ctime not found.
-ctime +190 -type f -exec echo rm {} \;
These are options of the find command, it should be something like:
find /your/path/ -ctime +190 -type f -exec rm {} \;
Try the command first without -exec rm {} \; to be shure you have the right output.
Regards
Thanks,
I tried with the command given by you.Its working.
Can u please tell me the steps in shell scripts for removing the file after every 6 months auomatically.
You can run this command with cron job, a link to a useful thread of Perderabo:
Regards
Thanks,
Actually I am very new to Unix so please tell in which directory shall I create this cron and what exension should I give
There are a lot of tutorials regarding cronjobs on the net, Google for cronjobs.
Regards
Hi
I want a shell command to create a text file