Results 1 to 5 of 5
Dear Experts,
If I've opened a file ( vi filename) and then written something in that, and then did a " :wq " with save and exit.
I think by ...
- 06-03-2009 #1Just Joined!
- Join Date
- Jun 2006
- Posts
- 40
File time stamp don't get changed? Is this possible ?
Dear Experts,
If I've opened a file (vi filename) and then written something in that, and then did a ":wq" with save and exit.
I think by doing this the file get updated with latest time stamp.
Is this possible to keep the file time stamp as it was eariler ? even If I am editing to the file today.
Is this possible, or just a silly question of mine?
Any help...please
Thanks-
Pawan
- 06-03-2009 #2
Use the touch command to reset it.
- 06-04-2009 #3Just Joined!
- Join Date
- Jun 2006
- Posts
- 40
- 06-04-2009 #4
Yes,if file already exists touch will update it's time stamp to reflect current time.
If file didn't exists already, then it will create an empty new file.
Linux already has noatime - It will not update the last accessed time.But, my concern was to keep the older time stamp as it is, even If I am updating/editing the file today. Is this possible ?
The atime and noatime attribute
But i'm not heard about nomtime ..
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 06-04-2009 #5Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
The command touch can alter the time to a specific value:
So, for example, if you were to capture the exiting mtime of a file, edit the file as you desire, then you could use touch to reset the mtime as originally existed.-d, --date=STRING
parse STRING and use it instead of current time
-- excerpt from man touch
The man and info pages are your friends ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )


Reply With Quote
