- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: 'touch' as one year old timestamped 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
Discussions
Discussions
Forums
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
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-23-2009 03:53 AM
тАО08-23-2009 03:53 AM
'touch' as one year old timestamped file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2009 04:49 AM
тАО08-23-2009 04:49 AM
Re: 'touch' as one year old timestamped file
The manpages are an incredible source of information. For example to change the modification timestamp of a file to one year ago today, you could do:
# touch -mt 200808231246 /tmp/foo
http://www.docs.hp.com/en/B3921-60631/touch.1.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2009 04:59 AM
тАО08-23-2009 04:59 AM
Re: 'touch' as one year old timestamped file
use touch command it will change only the timestamp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2009 05:00 AM
тАО08-23-2009 05:00 AM
Re: 'touch' as one year old timestamped file
> information.
Ineresting. I usually find them to be the
exact opposite: a credible source of
information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2009 05:13 AM
тАО08-23-2009 05:13 AM
Re: 'touch' as one year old timestamped file
A generalized solution could be accommodated with Perl:
# perl -e '$now=time;utime $now,$now-(60*60*24*365),@ARGV' /tmp/foo /tmp/bar
Pass one or more file names as arguments as shown. The modification ('mtime') of each argument will be changed to one year prior.
@ Steven: Yes, you got me :-)
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2009 09:25 AM
тАО08-23-2009 09:25 AM
Re: 'touch' as one year old timestamped file
#touch -mt