Moderate

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 ?

Correct answer: D. find /user/* \(-mtime + 365 - a - atime +365 \) - OK rm {} \;

  • 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 {} \;

Explanation

The find expression combines -mtime +365 and -atime +365, so both modification and access must be older than one year; -ok rm asks for confirmation before deletion. The other choices either omit one condition or use invalid commands and syntax.

Last updated

Practise Software Development Lifecycle

423 free Software Development Lifecycle MCQs from Software Engineering, each with the correct answer and an explanation. Unlimited attempts, no account needed.

Exams that ask Software Engineering questions like this

Software Engineering is on this paper prepared for on TestUstad, and all of them draw the same bank, so this question is worth knowing for it.

Related questions