I was hoping the man pages would help but there were no examples and searching for "find" comes up with a ton of info, that has no relation to this. I have a script that backs up the mysql database (using mysqldump) and then renaming it to the current date. I only want to keep the last 7 days. Right now the script just looks for a file with a date from 8 days ago and deletes it. The problem with this is if the computer locks up or something (which seti@home does every once and a while) that file may not get deleted. I was looking for a better way to do this. I thought I would be able to do this with the find command, but I couldn't figure it out. I can get it to show the past 7 days, but I want it to show the reverse of that, everything BUT the last 7 days. I am doing the 7 day thing by doing the following:
Also, I've always had problems with this on find, but what's the proper way to search for part of a file. If I try something like `find -name database*` where the file would be something like database_20031225.sql.gz it gives me an error that paths must precede expression.
this is all happening in mandrake 9.1 btw