How can I change the date modified/created of a file?

[From]: http://askubuntu.com/questions/62492/how-can-i-change-the-date-modified-created-of-a-file

Easiest way – accessed modified will be the same:

touch -a -m t 201512180130.09 fileName.ext

Where:

-a = accessed
-m = modified
t  = timestamp - use [[CC]YY]MMDDhhmm[.ss] time format

If you wish to use NOW just drop the t and the timestamp

To verify they are all the same: stat fileName.ext

See: touch man

shareimprove this answer
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s