Multiple choice unix

Which of the following commands is used to update access and modification times of a file?

  1. grep

  2. wc

  3. touch

  4. cat

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

touch updates a file's access and modification timestamps to the current time. If the file doesn't exist, it creates an empty file. grep searches, wc counts, cat displays.