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:
- Modify or Adjust File Date Time on Unix/Linux You have folders or files in your server last modified...
- Linux/Unix Search and Replace Text from Multiple Files In Linux/Unix, for newbie to do search text from multiple...
- How to Change Hostname in Unix FreeBSD We have interesting hostname for our all our servers. Some...
- Quick File Copy on File Name with Sample Extension By default, some of the application installation provide you a...
- OS X Lion Release Date OS X Lion Release Date is Today, 20th July 2011...
- convert epoch using date command date -d ‘<Unix epoch> <epoch date> sec’ e.g. date -d...
- 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...
- How to Change MySQL Data Directory in Linux Centos By default Linux CentOS or other Linux Distro installation, MySQL...
- How to Find Out Public IP Address via Command Line in Unix/Linux Machine If you have more than 100 servers in your network;...
- Set time & date automatically in KDE For NTP use in KDE : - apt-get install ntpdate...
Tags: date and time, file, file system, freebsd, touch, unix