Modify or Adjust File Date Time on Unix/Linux

You have folders or files in your server last modified date/time was 3 months ago, sometime for some reason we would like to change files or folders last modified date/time to older or recent date. You can modify the date/time of a folder or file with Unix/Linux touch command.

For example I have a file name wireless.pcap, last update or created was in year 2009. I can change the last modify time by the touch command touch -t yyyymmddhhmm filename

shell> touch -t 201007101540 wireless.pcap

This will change the file last updated date and time to 10th July 2010 15:40pm.

Related posts:

  1. Changing File’s Date and Time on Unix Systems Change Data and Time of a File At times, we...
  2. Quick File Copy on File Name with Sample Extension By default, some of the application installation provide you a...
  3. Linux/Unix Search and Replace Text from Multiple Files In Linux/Unix, for newbie to do search text from multiple...
  4. OS X Lion Release Date OS X Lion Release Date is Today, 20th July 2011...
  5. How to Change MySQL Data Directory in Linux Centos By default Linux CentOS or other Linux Distro installation, MySQL...
  6. How to Find Out Public IP Address via Command Line in Unix/Linux Machine If you have more than 100 servers in your network;...
  7. Open file and Splitting String in Perl What I gonna do is to read a bunch of...
  8. How to Change Hostname in Unix FreeBSD We have interesting hostname for our all our servers. Some...
  9. convert epoch using date command date -d ‘<Unix epoch> <epoch date> sec’ e.g. date -d...
  10. mount hfsplus (mac os file system) under Debian linux Have an external hard disk with hfsplus or hfs+ partition...

Tags: , , ,

Leave a Reply