DEV Community

Mohamed Yahia
Mohamed Yahia

Posted on • Edited on

How to delete files in the terminal safely

To mitigate the problem of deletion by mistake. Two options were introduced to the rm command

-i option shows an interactive prompt asking you if you want to delete that item, for several items or a folder it will ask for every file and folder if you want it to be deleted.

-I option is less intrusive and will ask only if you were to delete more than 3 files or a folder and it will give only one prompt for all.

Try it and tell me what you think.

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay