Unix

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

A grep

B wc

C touch

D cat

E None of the above

ANS:C - touch

There are various options with touch I will be talking about -m (modification time).

Let say you created a file and modified it at 12.

Use the command "stat file_name" it will give details about access, modify and change time it will show the modify time as 12.

Now let say at 12 : 30 you enter the command "touch -m file_name" it will change the modify time to 12 :30.

You can check that by "stat file_name".



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.