- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mtime
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
12-13-2009 04:48 AM
12-13-2009 04:48 AM
mtime
I want to delete files 1 day old.Can i use mtime +1 along with find command for the same?
regards
himacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2009 05:32 AM
12-13-2009 05:32 AM
Re: mtime
find path -mtime +1 -exec rm -rf +
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2009 05:54 AM
12-13-2009 05:54 AM
Re: mtime
find . -mtime +1 -exec ll {} \; -> list file older than 1 day
find . -mtime +1 -exec rm -rf {} \; -> delete /remove files older than 1 day
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2009 12:37 PM
12-13-2009 12:37 PM
Re: mtime
(always look at the selection first)
find . -type f -mtime +1 -exec ll {} +
find . -type f -mtime +1 -exec rm -f {} +
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2009 12:20 AM
12-14-2009 12:20 AM
Re: mtime
Actually i set -mtime +1 to delete the 1 day old files..but its deleteing 2 days old files..
regards
himacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2009 12:28 AM
12-14-2009 12:28 AM
Re: mtime
can you post the "command" ?
its better to ll -list file before you delete them so that you can double check your excution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2009 12:44 AM
12-14-2009 12:44 AM
Re: mtime
-mtime +5 more than 5 days
-mtime -5 for less than 5 days
-mtime 5 for exactly 5 days
Regds..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2009 12:49 PM
12-14-2009 12:49 PM
Re: mtime
That's what I said, +1 means two or more. Unless you use:
UNIX95=FIDDLE_WITH_FIND_TIMES find ... -mtime +1 ...
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1389161
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1306285
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1271016
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2009 08:40 PM
12-14-2009 08:40 PM
Re: mtime
> command [...]
Why not try a Forum search for keywords like,
say,
find mtime
and learn all this for yourself?
Look first, ask later? Only a thought.