Home  >  Article  >  Operation and Maintenance  >  What is the command to delete a directory in Linux?

What is the command to delete a directory in Linux?

angryTom
angryTomOriginal
2020-02-07 17:12:0215455browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn