Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-19-2005, 11:17 AM
|
#1
|
|
LQ Newbie
Registered: Jul 2005
Posts: 15
Rep:
|
Timestamp Help
Does anyone know how I can change a timestamp of the modification time or access time without changing the other?
|
|
|
|
07-19-2005, 12:55 PM
|
#2
|
|
Member
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357
Rep:
|
touch -a -m
man touch
|
|
|
|
07-19-2005, 01:07 PM
|
#3
|
|
LQ Newbie
Registered: Jul 2005
Posts: 15
Original Poster
Rep:
|
I have tried touch -a <199501052126> test.txt and
touch -m 200311251030 text.txt but after I press enter the date revert back to the current date and time...
Did I do something wrong?
|
|
|
|
07-19-2005, 01:23 PM
|
#4
|
|
Member
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357
Rep:
|
Are you the owner of the file?
If not, run it as root.
|
|
|
|
07-19-2005, 01:52 PM
|
#5
|
|
LQ Newbie
Registered: Jul 2005
Posts: 15
Original Poster
Rep:
|
I have all the read, write, and execute permission.
How do I run it as root?...
|
|
|
|
03-16-2006, 12:12 PM
|
#6
|
|
LQ Newbie
Registered: Mar 2006
Posts: 5
Rep:
|
You have to log in as root.
|
|
|
|
03-16-2006, 12:17 PM
|
#7
|
|
Senior Member
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250
Rep:
|
Double posting under two different user names is still double posting.
|
|
|
|
03-17-2006, 02:33 AM
|
#8
|
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
Read the man pages. It clearly says you need to put -t before you give the timestamp.
So, correct command is:
Code:
touch -m -t 200311251030 text.txt
Last edited by timmeke; 03-17-2006 at 02:34 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:27 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|