Multiple choice technology operating systems

Which command is used to modify the access time of a file?

  1. cat

  2. touch

  3. ls

  4. file filename

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The touch command updates a file's access and modification timestamps to the current time. If the file does not exist, touch creates an empty file. The cat command displays file contents, ls lists directory contents, and file shows the file type information - none of these modify access times.