Skip to main content

Command Palette

Search for a command to run...

How to delete files in the terminal safely

Updated
1 min read
N

Aspiring Frontend Engineer

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.

More from this blog

My Technical Blog

38 posts