how to delete a folder in linux


When we use a linux system, we can quickly delete a folder through the rm command line,Delete all files and folders in the directory at the same time

This tutorial will teach youhow to delete a folder in linux

Command Line

Cascading delete test files

rm -ir test

Parameter Description

rmRemove one or more containers.
psList containers.
-iprompt before every removal.
-rremove directories and their contents recursively.

operation result

rm: remove directory 'test'? 

Important reminder

It is recommended to delete the folder through -i to prevent direct deletion


If you have any questions in use, you can leave a message below, or submit issuse on github ♥