LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-21-2008, 08:30 AM   #1
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Rep: Reputation: 15
change modified date stamp of file


Hi guys i would like to know how to change the last modified date stamp on a file to a date i specify

i have tried
Code:
touch -t [[20]08]08150000[.00] filename
but i get an error
touch: invalid date format `[[20]08]08150000[.00]
 
Old 08-21-2008, 08:32 AM   #2
MarkByers
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Rep: Reputation: 0
Try this instead:

touch -t 200808150000.00 filename

The square brackets mean that the field is optional. The square brackets should not be typed.
 
Old 08-21-2008, 08:33 AM   #3
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 15
sorry but i figured it out touch -d worked
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to find modified date and last accessed date of any file. parasdua Linux - Newbie 6 04-22-2008 10:59 AM
date stamp file or directory name dgermann Linux - General 6 02-02-2008 05:53 PM
[bash] Seeing if a file has been modified before/after a date w3stfa11 Programming 7 10-15-2006 07:02 PM
Rename file based on its own date/time stamp airman99 Linux - General 19 09-05-2006 08:52 AM
Rename file with date stamp MacSob Linux - General 6 09-13-2005 02:30 PM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration