HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar restore time/date stamp
Operating System - HP-UX
1832802
Members
3393
Online
110045
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
07-28-2006 06:21 AM
07-28-2006 06:21 AM
When restoring a xxx.tar file, the time/date for restored files matches the time/date stamp of the original file.
But for directories, the time/date stamp is the time the restore (tar xf) is executed.
Any way to retain the last modified date for directories?
But for directories, the time/date stamp is the time the restore (tar xf) is executed.
Any way to retain the last modified date for directories?
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2006 07:04 AM
07-28-2006 07:04 AM
Solution
Hi Rick:
I think that you are stuck with the fact that the 'mtime' of a restored directory will reflect the 'tar' extraction time anytime the directory requires creation or anytime the *contents* of the directory are changed (e.g. by the restoration).
Regards!
...JRF...
I think that you are stuck with the fact that the 'mtime' of a restored directory will reflect the 'tar' extraction time anytime the directory requires creation or anytime the *contents* of the directory are changed (e.g. by the restoration).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2006 07:15 AM
07-28-2006 07:15 AM
Re: tar restore time/date stamp
Hi Rick,
AFAIK, no.
If you think about it when the dir entry is first extracted it will have the original date/time stamp.
BUT as soon as you start extracting files into it you are modifying it. Therefore it's date/time stamp *must* change.
So the only way to keep the previous date/time stamp is to extract only an empty dir.
I suppose you could extract the date/time value as it's backed up and store it somewhere & then use the touch -t with the saved value to reset it back. But tar, cpio, even pax cannot do this for you as they are written.
HTH,
Jeff
AFAIK, no.
If you think about it when the dir entry is first extracted it will have the original date/time stamp.
BUT as soon as you start extracting files into it you are modifying it. Therefore it's date/time stamp *must* change.
So the only way to keep the previous date/time stamp is to extract only an empty dir.
I suppose you could extract the date/time value as it's backed up and store it somewhere & then use the touch -t with the saved value to reset it back. But tar, cpio, even pax cannot do this for you as they are written.
HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP