- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Accurate time stamp on files?
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
10-09-2001 01:43 PM
10-09-2001 01:43 PM
David..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2001 02:14 PM
10-09-2001 02:14 PM
SolutionThis should do what you need to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2001 02:42 PM
10-09-2001 02:42 PM
Re: Accurate time stamp on files?
I have a perl script that I've used for quite a while.
ftimes.pl
ftimes.pl [-m | -a | -c ] [-e] file1 ...
For each file it will print the datestamp of mtime (default) or -a atime or -c ctime. The -e arg causes the output to be in epoch seconds rather than the standard date format.
If more than 1 filename is supplied, the filename is printed followed by the datestamp otherwise simply the datestamp.
Enjoy, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2001 03:34 PM
10-09-2001 03:34 PM
Re: Accurate time stamp on files?
Here's a somewhat obtuse way:
# shar -m ./myfile > ./myfile.shar
# grep touch ./myfile.shar
...you will see the modification and access timestamps this way at the hour/minute/second level.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2001 01:36 AM
10-10-2001 01:36 AM
Re: Accurate time stamp on files?
echo /path/file | cpio -o 2>/dev/null | cpio -ivt 2>/dev/null
It is only slightly less obtuse than James' method! :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2001 10:23 AM
10-10-2001 10:23 AM
Re: Accurate time stamp on files?
why not write a small C program to "stat(2)"
that file and use the data you get?
Just my ?0.02,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2001 07:14 AM
10-12-2001 07:14 AM
Re: Accurate time stamp on files?
Thanks again for all of your replies.. ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2001 07:36 AM
10-12-2001 07:36 AM
Re: Accurate time stamp on files?
My apologies! I could have sworn that I was correct. It turns out that the "01" you see is the YY (year). If you look at the 'touch' man pages, you will see that the syntax used in the 'shar' file is the deprecated form of 'touch' where the timestamp is expressed as 'MMDDhhmm[YY]' instead of '[[CC]YY]MMDDhhmm[.SS]'.
Regards!
...JRF...