<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
find /path -type f -mtime +8 -exec /bin/rm -f {} \; > /dev/null <br>
<br>
On 3/11/10 10:27 AM, Mike Haun wrote:
<blockquote
cite="mid:a6191e831003110727h45406e0esce9f9078d2f2df73@mail.gmail.com"
type="cite">Hi Tom,<br>
Did you get this resolved? I have one running that I'll look up if you
need it.<br>
Mike<br>
<br>
<br>
<div class="gmail_quote">On Mon, Mar 8, 2010 at 11:24 PM, Tom Hanlon <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:tom@functionalmedia.com">tom@functionalmedia.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Colug,<br>
<br>
Any advice on how to create a script that deletes files older than a<br>
week ?<br>
<br>
The backup script is creating files in a subdirectory per database, so<br>
I will have like 3 folders.<br>
<br>
The files are named..<br>
mysql_2010-03-05_02h02m.Friday.sql.gz<br>
<br>
Once the file is created it is not moved.. So in addition to the date<br>
encoded in the name we also have the ability to delete based upon<br>
creation time<br>
<br>
-rw-r--r-- 1 root root 424 Mar 9 02:02<br>
mysql_2010-03-09_02h02m.Tuesday.sql.gz<br>
<br>
Thanks for any advice..<br>
<br>
I will run man ls , after I send this and probably see what I need to<br>
filter on. Then again by the time I get back to my email you all will<br>
have multiple ways to skin this cat as well.<br>
<br>
Thanks.<br>
<font color="#888888"><br>
--<br>
Tom<br>
_______________________________________________<br>
colug-432 mailing list<br>
<a moz-do-not-send="true" href="mailto:colug-432@colug.net">colug-432@colug.net</a><br>
<a moz-do-not-send="true"
href="http://lists.colug.net/mailman/listinfo/colug-432"
target="_blank">http://lists.colug.net/mailman/listinfo/colug-432</a><br>
</font></blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
colug-432 mailing list
<a class="moz-txt-link-abbreviated" href="mailto:colug-432@colug.net">colug-432@colug.net</a>
<a class="moz-txt-link-freetext" href="http://lists.colug.net/mailman/listinfo/colug-432">http://lists.colug.net/mailman/listinfo/colug-432</a>
</pre>
</blockquote>
</body>
</html>