- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: find command with newera option like HP-UX on ...
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
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
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
09-20-2011 12:23 PM
09-20-2011 12:23 PM
find command with newera option like HP-UX on RHEL5
To find the files created/accessed in the last <n> minutes, on HP-UX we use find with -newera option after touching 2 files with different timestamps and comparing them (with find / -newera file1 ! -newera file2). What would be a similar command in Linux? Thanks in advance!
Mike.
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2011 02:41 PM
09-20-2011 02:41 PM
Re: find command with newera option like HP-UX on RHEL5
Hi:
Enlightenment can be found in the manpages :-) That said, Linux supports find() options like '-daystart' which alters the notion of a "today" for the options '-[acm]min' and '-[acm]time' in additon to the '-[acm]newer file'.
Based upon your question, you would want something like:
# find . -type f -mmin -30 -print
...to find files last modified with 30-minutes of the current time.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2011 08:32 AM
10-04-2011 08:32 AM
Re: find command with newera option like HP-UX on RHEL5
Hello JRF
find with -mmin would only give the files modified, i also want to know files accessed (that is what -newera on hp-ux would do). so what i would do is the following
1. touch filea
2. sleep for n seconds
3. touch fileb
4. use the find command to see what all files where accessed/modified etc in the last n seconds.
I want to do that in RHEL 5 linux.
Thanks
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2011 11:09 AM
10-04-2011 11:09 AM
Re: find command with newera option like HP-UX on RHEL5
@Mike_Swift wrote:find with -mmin would only give the files modified, i also want to know files accessed (that is what -newera on hp-ux would do). so what i would do is the following
...
I want to do that in RHEL 5 linux.
# find . -type f -amin -30 -print
...to find files last *accessed* within 30-minutes of the current time.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2011 10:19 PM
10-04-2011 10:19 PM
Re: find command with newera option like HP-UX on RHEL5
Hello.
Well GNU find also supports "-newerXY" switch, "-not/"' and the "-a/-and" one.
info find -> Finding Files -> Time -> Comparing Timestamps
info find -> Finding Files -> Time -> Age Ranges
That should be enough to do what you want.
Regards,
Goran