Computer Science - Unix - Discussion

Discussion :: Unix - Section 2 (Q.No.32)

32. 

Which of the following commands is used to remove files with confirmation prompt from the user file system which have neither been accessed nor modified i the last one year?

[A]. find -mtime +365 | rm
[B]. grep (/usr/*) - mtime + 365 | -ok rm
[C]. find -name - mtime + 365 / - ok rm
[D]. find /user/* \(-mtime + 365 - a - atime +365 \) - OK rm {} \;
[E]. None of the above

Answer: Option D

Explanation:

No answer description available for this question.

Amit said: (May 24, 2014)  
Please explain the option D. What is OK and what is /user/*?

Wided said: (Sep 21, 2014)  
OK refers to the confirmation prompt.

Wided said: (Sep 21, 2014)  
And /usr/* I think it refers to the user file system.

But I don't understand \(-mtime + 365 - a - atime +365 ).

And logically the pipe must be used in this case.

Meena said: (Mar 14, 2016)  
Please explain the option D. How it will be the answer?

Spoiltbratkabirr said: (May 10, 2017)  
Please Explain Option D.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.