Vidyalelo
Computer Science · Q22

UNIX

Engineering and GATE · Computer Science · question 22

Q22

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

A.
grep
B.
wc
C.
touch
Answer
D.
cat
E.
None of the above

Answer: Option C

Solution

Answer: Option C
Solution:
In Unix, the touch command is used to update access and modification times of a file. If the file specified doesn't exist, touch creates an empty file with the specified name.
So, touch is the correct command to update access and modification times of a file.