Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

touch linux

Setting specific timestamps
The touch command also allows us to update or create a file with a specific time other than the current time.

Use the -d (--date=) option to specify a date string and use it instead of the current time.

For example, to change both the last access and modification times of file1 to 1 June 2018 11:02 you would use the following command:
touch -d '1 June 2018 11:02' file1
 
PREVIOUS NEXT
Tagged: #touch #linux
ADD COMMENT
Topic
Name
3+2 =