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. convert epoch using date command date -d ‘<Unix epoch> <epoch date> sec’ e.g. date -d...
  2. Open file and Splitting String in Perl What I gonna do is to read a bunch of...
  3. Configure Your Own screenrc file There are few shell scripts I need to run...
  4. 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...
  5. Set time & date automatically in KDE For NTP use in KDE : - apt-get install...
  6. Changing Default Mail Application in Mac OS X No matter how many times I tried to configured Thunder...
  7. Check DNS Record with Dig Command Check DNS Record with Dig Command How do you find...
  8. useful unix command: xargs In our mailserver, we backup every incoming email and keep...
  9. Apple Leopard Network File Sharing One thing I like about Leopard is the Network...
  10. How to Use Wget to Download Manual from Website Most of the time, we would prefer to read manual...

Tags: , , , , ,

Leave a Reply