Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-21-2008, 07:30 AM   #1
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
touch -t [[20]08]08150000[.00] filename
but i get an error
touch: invalid date format `[[20]08]08150000[.00]
Old 08-21-2008, 07:32 AM   #2
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, 07:33 AM   #3
Registered: Jan 2008
Posts: 103

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


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 09:59 AM
date stamp file or directory name dgermann Linux - General 6 02-02-2008 04:53 PM
[bash] Seeing if a file has been modified before/after a date w3stfa11 Programming 7 10-15-2006 06:02 PM
Rename file based on its own date/time stamp airman99 Linux - General 19 09-05-2006 07:52 AM
Rename file with date stamp MacSob Linux - General 6 09-13-2005 01:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:18 PM.

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