Hi guys,
I want to delete files from june 13 to june 30, using rm command can any one tell me the sintax to remove. I ahve hunderd of core files in my /var dir. so i want to clear last month core files. Thanks in Advance.:))
Hi guys,
I want to delete files from june 13 to june 30, using rm command can any one tell me the sintax to remove. I ahve hunderd of core files in my /var dir. so i want to clear last month core files. Thanks in Advance.:))
There are a couple of ways to do this. Do the names of the core files include the date they were created?
You can do something like this
find . -name core* -mtime +15 -exec rm -f {} \;
This finds all core files in the current directory (.) which are older 15 days and deletes them.
Prior the rm -f you can check which files will be deleted with a echo
find . -name core* -mtime +15 -exec echo {} \;