At 08:31 PM 1/30/2002 -0600, you wrote:
>>I'm trying to get a list of files 30 day sold or younger. I thought the following
>would to the trick:
>>
>>find . -type f -mtime 30 -ls
>>
>>But that only prints files that are exactly 30 days old. How do I do that "and
>younger" part?
>>Less then 31 days would be a suitable substitute too.
>>
>>Jonathan Wilson
>
>Read the man page for find again. It is described right there on the page.
Actually no, it was not in the name page - not that I could see. And I did read it.
The best it did was:
-mtime n
File's data was last modified n*24 hours ago.
No mention of + or - there.
OTH, I did discover by reading the man page that there is an info page "info Finding
Files" - and that proved quite useful. As I said in my Re: I did figure out, thanks to
the info page, no thanks to the man page.
The following did the trick:
find /logs/ -type f -mtime +30 -name "*log.gz" -exec cp -p {} . \;
----------------------------------------------------
Jonathan Wilson
System Administrator
Cedar Creek Software http://www.cedarcreeksoftware.com
Central Texas IT http://www.centraltexasit.com
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list