Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Finding old files
Date: Fri, 19 Nov 2010 16:56:24
Message-Id: AANLkTi=OQ9b_OJMeQ=gGAt1ZXpGSj9O=KYyXPDpw0Try@mail.gmail.com
In Reply to: [gentoo-user] [OT] Finding old files by Peter Humphrey
1 On Fri, Nov 19, 2010 at 10:29 AM, Peter Humphrey
2 <peter@××××××××××××××.org> wrote:
3 > Hello list,
4 >
5 > Just to expose my ignorance again, would someone lift my blinkers
6 > please? I'm recovering from an infection and my brain is stuck.
7 >
8 > It's time to start pruning old stuff from the website I run, which has
9 > 2200 files in 200 directories.
10
11 You can use -mtime option in find to return files whose modification
12 time are older than X days ago. For example I have a job to delete
13 files who are 48 hours old using something like:
14
15 find /directoryname -mtime +1 -delete
16
17 (something like that, i'm writing it from memory, refer to manpage)