One Linux command per day (7): rmdir command

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.