09-08-2023, 12:52 PM
The Linux touch command can also set a file’s access and modification time by reading the timestamp information from another file. For example, the following touch command with the -r option will scan the timestamp information from reference.txt and set these timestamp values to file_name.txt. Here’s an example of the command:
touch -r reference.txt file_name.txt


