- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Change the date of file
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
08-21-2002 08:24 PM
08-21-2002 08:24 PM
eg.
From:
-rw-r--r-- 1 root sys 20000 Aug 22 01:25 file
To:
-rw-r--r-- 1 root sys 20000 Aug 21 01:25 file
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 08:27 PM
08-21-2002 08:27 PM
Re: Change the date of file
# touch -t 200208210125 test1
# ll test1
-rw-r--r-- 1 root sys 0 Aug 21 01:25 test1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 08:30 PM
08-21-2002 08:30 PM
Re: Change the date of file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 08:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 08:40 PM
08-21-2002 08:40 PM
Re: Change the date of file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 09:42 PM
08-21-2002 09:42 PM
Re: Change the date of file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 05:12 AM
08-22-2002 05:12 AM
Re: Change the date of file
there are other dates associated with a file such as creation date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 05:28 AM
08-22-2002 05:28 AM
Re: Change the date of file
The is *no* creation date for a file, only a *modification* date which the first time would be the same as a creation date.
There is also a last-access timestamp and a last-inode-change timestamp.
'touch' can be used to change the modification timestamp ('touch -m') or the last-access timestamp ('touch -a').
'ls -l' shows a file's modification timestamp.
'ls -ul' shows a file's last-access timestamp.
'ls -cl' shows a file's last inode change (change of permissions, ownership, etc.).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 07:39 AM
08-22-2002 07:39 AM
Re: Change the date of file
l1:/tmp 125 > ll xx
697 -rw-rw-rw- 1 merijn softwr 4306 Aug 22 17:19 xx
l1:/tmp 126 > perl -e'for(@ARGV){utime((map{$_-86400}(stat)[8,9]),$_)}' xx
l1:/tmp 127 > ll xx
697 -rw-rw-rw- 1 merijn softwr 4306 Aug 21 17:19 xx
l1:/tmp 128 >
l1:/tmp 130 > ll xx.*
861 -rw-rw-rw- 1 merijn softwr 71315 Aug 22 17:24 xx.html
869 -rw-rw-rw- 1 merijn softwr 128 Aug 9 17:17 xx.pl
686 -rwxrw-rw- 1 merijn softwr 3033 Jul 24 15:59 xx.txt
l1:/tmp 131 > perl -e'for(@ARGV){utime((map{$_-86400}(stat)[8,9]),$_)}' xx.*
l1:/tmp 132 > ll xx.*
861 -rw-rw-rw- 1 merijn softwr 71315 Aug 21 17:24 xx.html
869 -rw-rw-rw- 1 merijn softwr 128 Aug 8 17:17 xx.pl
686 -rwxrw-rw- 1 merijn softwr 3033 Jul 23 15:59 xx.txt
l1:/tmp 133 >
HTH