Sunday, January 01, 2012

How to create a file and alter its date/time stampe with the touch command in linux

To create a file and alter its date/time stamp with the touch command:

Type touch newfile3 and press enter. This command creates the file newfile3.

Type ls -l newfile3 and press enter. You see a long listing for the newfile3 file.
Note: its modification date and time

Type touch newfile3 and press enter. This updates the file's access and modification date stamp and time stamp with the system date and time.

Type ls -l newfile3 and press enter. Look at the file's modification time. It should be different now.

No comments:

Post a Comment