John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based
network. John is working as a root user on the Linux operating system. He wants to change the
modified date and time of the file private.txt to 11 Nov 2009 02:59:58 am. Which of the following
commands will John use to accomplish his task?
Each correct answer represents a complete solution. Choose all that apply.
A.
touch -t 200911110259.58 private.txt
B.
rm private.txt #11 Nov 2009 02:59:58 am
C.
touch private.txt #11 Nov 2009 02:59:58 am
D.
touch -d “11 Nov 2009 02:59:58 am” private.txt
Explanation:
According to the scenario, John wants to change the modified date and time of the file private.txt
to a desired date and time. For this, he can use either the touch -t or touch -d command. The
difference between these two commands is that the touch -d command is more flexible, while the
touch -t command takes the date and time in the format MMDDhhmm.ss.