- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- finding files in HP-UX
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
тАО05-27-2003 01:36 AM
тАО05-27-2003 01:36 AM
I have a problem. I need find few files which was created in last 5 min but I don't now haw do it. I hope that somebady can help me.
(Sorry for my english :-) )
Kudlaty
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 01:40 AM
тАО05-27-2003 01:40 AM
Re: finding files in HP-UX
Then use the 'find /directory -newer [filename]' command.
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 01:41 AM
тАО05-27-2003 01:41 AM
Re: finding files in HP-UX
If you have a file , modified (or created) just before the files you want to find.
find . -newer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 01:46 AM
тАО05-27-2003 01:46 AM
SolutionYou need to do a few steps;
1. date to get the current date+time. If its equal to say May 27 10:45 then;
2. touch -m 05271040 /tmp/t
This creates a file 5 mins old in /tmp.
3. Now we can use find to compare /tmp/t to all current files to list those created in the last 5 mins;
cd
find . -newermm /tmp/t -print
Check the man page for find, you can change the mm after -newer to aa for access time (m = modified time) or cc for inode mod time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 01:50 AM
тАО05-27-2003 01:50 AM
Re: finding files in HP-UX
Thanks for yours help
Kudlaty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 02:12 AM
тАО05-27-2003 02:12 AM
Re: finding files in HP-UX
There is no option with find to list files created in the last 5 mins, but the -newercc option lists inode modification and this will capture all files created in the last 5 mins, but may also add in a few others (but unlikely), so use this otion (-newercc)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 03:10 AM
тАО05-27-2003 03:10 AM
Re: finding files in HP-UX
This includes gnu version of find which support -mmin option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 03:46 AM
тАО05-27-2003 03:46 AM
Re: finding files in HP-UX
Just a remark : the answer with a touch and a find -newer is the only 'short' solution in your case. You don't need to know the name of the files to do it :
# touch -m xxx /tmp/ref
# find / -newer /tmp/ref
The only problem is that on unix you can NEVER know when a file was CREATED. Only when it was last modified.
To get files CREATED, you have to manage an 'index' file every 5 minutes and then use diff or comm on index before and current.
Regards.