Re: a script to clean up all files in the last M minutes
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 11/18/04
- Next message: Jeff Rife: "Re: Weird sendmail alias setting, perhaps a hack?"
- Previous message: Damjan: "Re: a script to clean up all files in the last M minutes"
- In reply to: Damjan: "Re: a script to clean up all files in the last M minutes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Nov 2004 18:08:51 GMT
On Thu, 18 Nov 2004 at 17:41 GMT, Damjan wrote:
> Matt wrote:
>
>> I need to write a script that takes a parameter minute M to clean up
>> all files in a folder that are older than M compare with current system
>> time.
>
> define older! access time or create time?
>
> anyway 'find' will do it (options -amin, -cmin, -atime, -ctime, etc...).
>
> find -cmin +10 -exec rm {} \; will delete files created 10 or more minute
> before now.
There is no "create time". There is access (-atime), change of
status (-ctime), and modifictation time (-mtime).
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
===================================================================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Jeff Rife: "Re: Weird sendmail alias setting, perhaps a hack?"
- Previous message: Damjan: "Re: a script to clean up all files in the last M minutes"
- In reply to: Damjan: "Re: a script to clean up all files in the last M minutes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|