Home > Article > Operation and Maintenance > What is the command to delete a directory in Linux?
#What is the Linux command to delete a directory?
The command to delete a directory in Linux is rmdir
However, once the directory is not empty, it cannot be deleted.
Use the rm -rf command.
Just rm directly, but you need to add two parameters -rf, namely: rm -rf
● -r is downward recursion , no matter how many levels of directories there are, delete them together
● -f means to delete directly without any prompts
Note: Be extra careful when using this rm -rf, Linux No recycle bin
(Online video tutorial sharing: linux video tutorial)
The above is the detailed content of What is the command to delete a directory in Linux?. For more information, please follow other related articles on the PHP Chinese website!