Vidyalelo
Computer Science · Q31

UNIX

Engineering and GATE · Computer Science · question 31

Q31

Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on it

A.
-r
B.
-x
C.
-i
Answer
D.
-l
E.
None of the above

Answer: Option C

Solution

Answer: Option C
Solution:
In Unix, the rm command is used to remove files or directories. The -i option prompts the user for confirmation before deleting each file. When this option is used, rm will display the filename followed by a question mark (?), and the user needs to confirm by typing 'y' for yes or 'n' for no.
So, -i is the option used with the rm command to prompt the user with each filename and a question mark before acting on it.