Changing File’s Date and Time on Unix Systems

Change Data and Time of a File

At times, we might want to change date and time of a file, for record purposes. For example, when you copying log file from remote machine, when it’s extract on local machine, the date and time will reflect to current date time.

touch Command

To update the date and time of file, run;

touch -t ccyymmddhhMMSS filename

For more info, run;

man touch

Related posts:

  1. Modify or Adjust File Date Time on Unix/Linux You have folders or files in your server last modified...
  2. Quick File Copy on File Name with Sample Extension By default, some of the application installation provide you a...
  3. How to Change Hostname in Unix FreeBSD We have interesting hostname for our all our servers. Some...
  4. convert epoch using date command date -d ‘<Unix epoch> <epoch date> sec’ e.g. date -d...
  5. Open file and Splitting String in Perl What I gonna do is to read a bunch of...
  6. Linux/Unix Search and Replace Text from Multiple Files In Linux/Unix, for newbie to do search text from multiple...
  7. Changing Default Mail Application in Mac OS X No matter how many times I tried to configured Thunder...
  8. Configure Your Own screenrc file There are few shell scripts I need to run when...
  9. secure copy with failover – rsync & ssh e.g. rsync -av –progress -e ‘ssh -i /alternate/id/file’ sshusername@host:/directory/or/file /destination/directory/or/file...
  10. Set time & date automatically in KDE For NTP use in KDE : - apt-get install ntpdate...

Tags: , , , , ,

Leave a Reply