These are instructions for a friend of mine who’s not super-techy. He’s on a Mac, & periodically he needs to make sure all the files in a directory have the same date & time. The command line to the rescue1!

  1. Open Terminal by using Alfred or Spotlight (search for Terminal & when it’s found, make sure it’s selected & press Enter).

  2. In Terminal, type cd followed by a space, but do not press Enter.

  3. In Finder, find the folder that contains the files you want to change. Select that folder & drag it into Terminal. When you let go, you should now see the path to your folder after the cd, so that it looks like this: cd /Users/scott/Movies/My\ Project.

  4. Press Enter in Terminal.

  5. If you want to change the modification time of all the files, enter the following in Terminal: touch * (that’s an asterisk). Press Enter. Note that this will change every file in the folder. If you only want to change the mp4 files, you’d type touch *.mp4; to change the mov files, you’d type touch *mov, and so on.

  6. To verify that all files now have the same date, type ls -l in Terminal & press Enter. You’ll see a bunch of info, but you should be able to tell that the dates of all the files are now the same.

  7. Close Terminal.

  1. Of course, he could also buy my book Linux Phrasebook & read the section on touch. Just sayin’.