The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat
.
google unix.com



Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Comparing the file drop date with todays date Rajneel Linux 3 03-26-2009 05:06 AM
Perl: Extracting date from file name and comparing with current date MKNENI Shell Programming and Scripting 4 03-26-2008 04:01 PM
Move A File With Same Date,don't Change The Desitination Dir Date jee.ku2 UNIX for Dummies Questions & Answers 1 01-09-2008 01:42 PM
Changing Creation Date to a Prespecified Date of a File In Unix monkfan UNIX for Dummies Questions & Answers 4 11-28-2006 07:15 AM
compare today's date with date in a file siog UNIX for Dummies Questions & Answers 4 10-04-2006 12:55 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 4 Weeks Ago
aboorkuma aboorkuma is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 25
date of the file

HI

How i can retain the old date even thogh i modified the file in linux

for example

Sep 30 10:17 gr.txt

if i modify this file it will change the data stamp , but i wnat to keep
the old time stamp even i change the file

rds
  #2 (permalink)  
Old 4 Weeks Ago
thegeek thegeek is offline
Registered User
  
 

Join Date: Apr 2009
Location: /usr/bin/vim
Posts: 453
Are you looking for this touch ?

man touch(1)
  #3 (permalink)  
Old 4 Weeks Ago
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,175
A method to save the last updated timestamp. Does not save the file created timestamp.

Code:
# Save the timestamp by creating an empty file with a copy of the timestamp
touch -r gr.txt gr.txt.timestamp

# Edit the file

# Restore the timestamp
touch -t gr.txt.timestamp gr.txt

# Tidy up
rm gr.txt.timestamp
  #4 (permalink)  
Old 4 Weeks Ago
mark54g mark54g is offline
Registered User
  
 

Join Date: May 2008
Posts: 364
You can use touch to change the timestamp to whatever you wish
  #5 (permalink)  
Old 4 Weeks Ago
aboorkuma aboorkuma is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 25
Thanks for all members for support and help.

i am still getting this date format error

touch -r dbimp.par dbimp.par.200901261759.30

then i edit the file
then i try to resore the file , i get the date format error


touch -t dbimp.par.200901261759.30 dbimp.par

touch: invalid date format `dbimp.par.200901261759.30'


how i can resolve this date issue


rds

---------- Post updated at 07:41 AM ---------- Previous update was at 06:02 AM ----------

ok i found the date format
thanks for support and help

rds
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0