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...
- Quick File Copy on File Name with Sample Extension By default, some of the application installation provide you a...
- How to Change Hostname in Unix FreeBSD We have interesting hostname for our all our servers. Some...
- convert epoch using date command date -d ‘<Unix epoch> <epoch date> sec’ e.g. date -d...
- Open file and Splitting String in Perl What I gonna do is to read a bunch of...
- Linux/Unix Search and Replace Text from Multiple Files In Linux/Unix, for newbie to do search text from multiple...
- Changing Default Mail Application in Mac OS X No matter how many times I tried to configured Thunder...
- Configure Your Own screenrc file There are few shell scripts I need to run when...
- 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...
- 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