<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Here is how you can find files longer then 30 days
and remove them:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>find /file location/* -mtime +30 -exec ls {}
\;<BR>find /file location/* -mtime +30 -exec rm {} \;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The first find will just list the files over 30
days, the second command actually removes the files that are over 30 days
old.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2>I would think for the file size, you can use
the -<B>printf</B> format command instead of the mtime command, but not
sure. If you run a man find on your fedora box, it should give you the
right commands.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rob</FONT></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=genti_tek4@hotmail.com href="mailto:genti_tek4@hotmail.com">Genti A.
Hila</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=fedora-list@redhat.com
href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 21, 2004 11:24
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> log storage</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi list,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I want to use a Fedora box as storage server for
PIX logging, because I want to keep track of them and analyze.</FONT></DIV>
<DIV><FONT face=Arial size=2>Now I want to keep the logs for one month. And
once each directory or file is older than 30 days, I want it to be deleted. So
each day, some files are deleted.</FONT></DIV>
<DIV><FONT face=Arial size=2>At the same time. because this logs are huge, it
might happen that HDD fills up. In order to prevent this from happening, I
would like to set a certain size for the logs. If this fills up, than the
older logs are automatically deleted even though they are not yet 30 days
old.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Does any body, has a suggestion how to do this ?
What tool to use, or maybe some link that has more information on
that.</FONT></DIV>
<DIV><FONT face=Arial size=2>I do not mind reading but I just do not know
where to start.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you.</FONT></DIV>
<DIV><FONT face=Arial size=2>You're wonderful list.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Genti</FONT></DIV></BLOCKQUOTE></BODY></HTML>