Copyright Notice Update:2017-05-11
Bo Master: Luckyalan
Contact: [Email protected]
Statement: Draft not forget to dig well man, reproduced please indicate the source!
1 Article Introduction
This article describes the rmdir command under Linux.
2. Development platform
Linux Systems
3. Reading instructions
No
4 Article body
The RMDIR/RD command is to delete an empty directory that must be empty before a directory is deleted. RmDir only empty folders can be removed. To recursively folder and all of its contents, use the RM command.
4.1 Command 4.1.1 Command
Command: rmdir [options] Directory
Directory Features: Change command to remove one or more subdirectory entries from a directory, and to delete a directory must also have write access to the parent directory.
4.1.2 Parameters
- -p recursively deletes the directory dirname, which is also deleted when its parent directory is empty after the subdirectory is deleted (see 4.2.2). If the entire path is deleted or a partial path is reserved for some reason, the system displays the appropriate information on the standard output.
- -V,--verbose show instruction execution process
4.2 Command Instance 4.2.1 rmdir cannot delete a non-empty directory
4.2.2 subdirectory is deleted and is empty directory, can be recursively deleted
Command: rmdir-p test22/test222/test2222
5 References
1, the concept of this part of the reference to Wikipedia.
2, this article to a large extent refer to the "one Linux command per day (6): RmDir command"
One Linux command per day (7): rmdir command