- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to check timestamp
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-11-2007 06:13 PM
03-11-2007 06:13 PM
How to check timestamp
and process only files which whose creation time is 30 min less then current time. Please let me know if anyone knows how to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2007 07:14 PM
03-11-2007 07:14 PM
Re: How to check timestamp
you can view the time stamp by long listing the files.
ls -l will give you the time stamps
ls -lt will give you the sorted order of files with the file accessed latest will be listed first.
to filter the files according to time you can refer man page for find.
the options -atime, -mtime, -ctime may help.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2007 07:31 PM
03-11-2007 07:31 PM
Re: How to check timestamp
Perhaps you can write a script with this infos:
ls -l filename (modification time)
ls -lc filename (change time)
ls -lu filename (access time)
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2007 08:47 PM
03-11-2007 08:47 PM
Re: How to check timestamp
as you will know HPUX does not keep the creation time of a file, only its last access time.
So the closest you can get is to a list of files created within the last 30 minutes is:
create a dummy file and change the time ont he file with touch -t, setting it to your required time (systime - 30 minutes).
Now you can run a find with the -newer option, using the dummy file as a parameter.
For similar threads:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=67845
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=762560
mtime,atime etc only work on multiples of 24 hrs. For a quick solution you could try ls -lrt (list in recverse time order)
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2007 09:27 PM
03-11-2007 09:27 PM
Re: How to check timestamp
access, modification, change times of a file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2007 12:06 AM
03-12-2007 12:06 AM
Re: How to check timestamp
Must unix folks would 'touch' a reference file with a timestamp of 30 minutes ago and then find -newer.
I would use the perl -M file operator which gived the modification time in days.
Something like
perl -e 'foreach (
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2007 09:03 PM
03-13-2007 09:03 PM
Re: How to check timestamp
you have been given quite a few answers.
Can you now please update the thread.
If the problem is solved, could you please complete the thread by awarding points to helpful answers and summarising the solution for you.
Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
So far you have only awarded points to 1 out of 15 answers !!