Linux has three different timestamps in a file: last access time, last modification time and last change time. They are briefly described below:
In following examples, we want to set the file
myfile.txt to 15th of June 2019 and 10:15 AM.
$ touch -m -t 201906151015 myfile.txt
t stands for time which we set explicitly. The format is YYYYMMDDHHmm. The
-m means that we only want to change the modification time (as the content would be changed in that time).
$ touch -a -t 201906151015 myfile.txt
-a means that we only want to change the access time (as the file wouldd be opened in that time, but not changed).
The last change time cannot be edited with touch command.