What happens when the -i option is used with the rm command?

QuestionsQuestions8 SkillsProBasic Files OperationsAug, 27 2025
0309

When the -i option is used with the rm command, it enables interactive mode. This means that before each file or directory is deleted, the command will prompt the user for confirmation. You will need to type y (yes) to proceed with the deletion or n (no) to cancel it. This option is useful for preventing accidental deletions.

Here’s an example of how to use it:

rm -i filename.txt

In this case, the command will ask for confirmation before deleting filename.txt.

0 Comments

no data
Be the first to share your comment!