Re: a script to clean up all files in the last M minutes
From: Damjan (gdamjan_at_gmail.com)
Date: 11/18/04
- Next message: Chris F.A. Johnson: "Re: a script to clean up all files in the last M minutes"
- Previous message: Peter T. Breuer: "Re: more or less"
- In reply to: Matt: "a script to clean up all files in the last M minutes"
- Next in thread: Chris F.A. Johnson: "Re: a script to clean up all files in the last M minutes"
- Reply: Chris F.A. Johnson: "Re: a script to clean up all files in the last M minutes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 18 Nov 2004 18:41:48 +0100
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.
-- damjan
- Next message: Chris F.A. Johnson: "Re: a script to clean up all files in the last M minutes"
- Previous message: Peter T. Breuer: "Re: more or less"
- In reply to: Matt: "a script to clean up all files in the last M minutes"
- Next in thread: Chris F.A. Johnson: "Re: a script to clean up all files in the last M minutes"
- Reply: Chris F.A. Johnson: "Re: a script to clean up all files in the last M minutes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|