101-400 Exam QuestionsBrowse all questions from this exam

101-400 Exam - Question 48


Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?

Show Answer
Correct Answer: A

The 'file /tmp/myfile.txt' command is used only to determine the file type of /tmp/myfile.txt and does not alter its contents or metadata. As a result, it does not update the modify timestamp of the file. All the other commands involve writing to or editing the file, which would change the modify timestamp.

Discussion

1 comment
Sign in to comment
DuboisNicolasDuclairOption: A
Oct 21, 2023

The command that will NOT update the modify timestamp on the file `/tmp/myfile.txt` is: A. `file /tmp/myfile.txt` The `file` command is used to determine the file type of a file and does not modify the contents of the file. Therefore, it does not affect the modify timestamp of the file. The other commands in the list, including the `echo`, `sed`, `touch`, and the second `echo` command, involve reading from, writing to, or modifying the file in some way, which can update the modify timestamp.