HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- is it possible to set/restore the timestamp of a s...
Operating System - HP-UX
1837970
Members
2858
Online
110124
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
06-27-2004 08:33 PM
06-27-2004 08:33 PM
Hi.
I'm interested in copying some soft links from a directory/system to another directory/system. But their timestamp are modified as time they are created, not the original soft links.
For instance, LA is a soft link to file A. LA timestamp is 1 Jan 2002. A timestamp is 31 Dec 2002.
I run tar command to archive and restore in other system/location. But timestamp of LA in new location is not 1 Jan 2002, but the actual date.
I also tried using HP OmniBack-II but I obtained the same results.
is it possible to set/restore the timestamp of a soft link ?
Thanx in advance
I'm interested in copying some soft links from a directory/system to another directory/system. But their timestamp are modified as time they are created, not the original soft links.
For instance, LA is a soft link to file A. LA timestamp is 1 Jan 2002. A timestamp is 31 Dec 2002.
I run tar command to archive and restore in other system/location. But timestamp of LA in new location is not 1 Jan 2002, but the actual date.
I also tried using HP OmniBack-II but I obtained the same results.
is it possible to set/restore the timestamp of a soft link ?
Thanx in advance
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2004 09:30 PM
06-27-2004 09:30 PM
Solution
New symbolic links are always created with the current time as timestamp. Looks like the only way to change that could be the utime(2) syscall... however, that syscall always follows symbolic links.
...
u.u_error = namesetattr(uap->fname, FOLLOW_LINK, &vattr,
uap->tptr == NULL);
...
So I'm afraid, the answer is no.
Best regards...
Dietmar.
...
u.u_error = namesetattr(uap->fname, FOLLOW_LINK, &vattr,
uap->tptr == NULL);
...
So I'm afraid, the answer is no.
Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2004 09:31 PM
06-27-2004 09:31 PM
Re: is it possible to set/restore the timestamp of a soft link ?
Seems to be difficult. As in case of tar the soft link is created afresh as the following message displayed during a sample tar -xvf proves
x file13 symbolic link to file12
sks
x file13 symbolic link to file12
sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2004 09:42 PM
06-27-2004 09:42 PM
Re: is it possible to set/restore the timestamp of a soft link ?
hai,
Link file access,modification,.. informations are stored in the file stat structure. stat() will modify the access informations of a link file.
Normal files will be with the same time stamp. tar will archieve the link files with the same time stamp. During the extraction,link will try to access the source file. That access time will be modified in the file status structure by the stat() call.
Timestamp is changed,because the link file is trying to access the source file at that time to renew the link on the new location.
see stat.2 man page more.
Regards,
Muthukumar.
Link file access,modification,.. informations are stored in the file stat structure. stat() will modify the access informations of a link file.
Normal files will be with the same time stamp. tar will archieve the link files with the same time stamp. During the extraction,link will try to access the source file. That access time will be modified in the file status structure by the stat() call.
Timestamp is changed,because the link file is trying to access the source file at that time to renew the link on the new location.
see stat.2 man page more.
Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
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