- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- deleting files by timing
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 05:16 PM
03-07-2005 05:16 PM
deleting files by timing
I am doing some housekeeping on my over cluddered filesystem. I was just wondering is there anyway I can delete away files by their time.. say files before "20:54:50" of the day?
thank u..
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 05:59 PM
03-07-2005 05:59 PM
Re: deleting files by timing
You can read in man fo "find" command how to define the time window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 06:07 PM
03-07-2005 06:07 PM
Re: deleting files by timing
Here is a document if you have access to knowledgebase:
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000067131091
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000068500492
An example to remove files older than a week:
find /qti/archive -name :qtiarch*dbf.: -mtime +7 -exec rm {} \; -print
Hope this help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 06:55 PM
03-07-2005 06:55 PM
Re: deleting files by timing
You can use find with mtime patameter to find the files that are older than a specified time and delete them.
Eg:- find /directory_name_path -name "arch*log" -mtime +3 -exec rm {} \;
will delete all the archive logs older than 3 days.
You could use the -newer option as well.
For other options have a lokk at man find.
IA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 07:10 PM
03-07-2005 07:10 PM
Re: deleting files by timing
As many have mentioned in the previous posts, use -mtime qualifier with the find command to do this.
Addtional help you could look at man find
rgds
Mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 07:39 PM
03-07-2005 07:39 PM
Re: deleting files by timing
if you want to remove files before a certain time AND DATE.
touch -t [[CC]YY]MMDDhhmm[.SS] file.mark
then use the find command with:
-newer file.mark
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 11:03 PM
03-07-2005 11:03 PM
Re: deleting files by timing
find . ! -newer file.mark
The "!" says "Not newer than"