Changing modification files date from a directory

Hello guys,

We can use touch command to change the modification date of single file, but how could I do to change all of files in directory? Well we can use combination of commands. Like that:

find /path/to/files -exec touch -t 201302211500 {} \;

This will change teh modification date of the files to Year: 2013, Month: 02, Date: 21, Hour: 15, Minute: 00. The option -t has the following meaning:

-t time 
specifies a particular time using this format:

[[[[cc]yy]MM]dd]hhmm[.ss]

, where cc is the optional first 2 digits of the year, 
yy is the optional last 2 digits of the year, 
MM is the optional number of the month (01-12), 
dd is the optional day of the month, 
hh is the hour in 24 hour format (required), mm is the minutes (required), 
ss is the optional seconds.

An obsolete (but still supported) version 
of this command lets you omit the -t, but the format is:

MMddhhmmyy[yy]

So… that’s all for while,

Advertisements

One thought on “Changing modification files date from a directory

  1. Howdy just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading correctly. I’m not sure why but I think its a linking
    issue. I’ve tried it in two different browsers and both show the same outcome.

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