- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to find files modified in the last hour?
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
Discussions
Discussions
Discussions
Forums
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
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
тАО06-25-2006 09:20 PM
тАО06-25-2006 09:20 PM
I'm looking for something other than:
find /mnt -xdev -type f -print | xargs ll | ...
(then awk, then grep for date, so on & so forth)
Maybe some sort of accounting? Maybe a file system level command? Maybe a neat shell trick? Or a little known utility?
Thanks much in advance! Points will be assigned accordingly.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2006 09:22 PM
тАО06-25-2006 09:22 PM
Re: how to find files modified in the last hour?
You are missing the mtime directive
-mtime +1
or
-mtime -1
I always forget plus or minus
:-)
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2006 09:25 PM
тАО06-25-2006 09:25 PM
SolutionCreate a "reference" point:
# touch -mt 06260500 /tmp/myref
# find /path -xdev -type f -newer /tmp/myref
...This finds all files in /path, remains under that directory or mountpoint and returns files modified more recently than the 'mtime' associated with '/tmp/myref'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2006 09:26 PM
тАО06-25-2006 09:26 PM
Re: how to find files modified in the last hour?
Note that the '-mtime' switch of 'find' has a granularity of 24-hours or 1-day. See the manpages for 'find'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2006 09:28 PM
тАО06-25-2006 09:28 PM
Re: how to find files modified in the last hour?
Alas, just not granular enough.
P.S. + mean "more than" & - means "less than" if my memory serves me right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 02:43 AM
тАО06-26-2006 02:43 AM
Re: how to find files modified in the last hour?
Create a temp file using the 'touch' command, such that the modification time is one hour in the past. For example:
# date +%m%d%H%m
06261006
# touch -mt 06260906 /tmp/tdate
# ll /tmp/tdate
-rw-r--r-- 1 root root 0 Jun 26 09:06 /tmp/tdate
Then run 'find' with the '-newer' switch, taking advantage of this file:
find /mnt -newer /tmp/tdate -type f -xdev -exec ll {} \;
If the granularity is still too coarse, 'touch' will even let you set seconds in a file's mtime.
PCS