"Linux learning is not difficult" file/directory Management (7): rmdir command to delete empty directories

Source: Internet
Author: User
Tags parent directory

7.7 "Linux learning is not difficult" file/directory Management (7): rmdir command to delete empty directories

Use the rmdir command to remove an empty directory from a Linux system.

Command syntax:

rmdir [Options] [contents]

The meanings of the options in the command are as shown in the table.

Options

option meaning

-P

Delete directories recursively, and when subdirectories are deleted, their parent directory is empty.

Example: Delete Empty directory newdir1.

[Email protected] ~]# rmdir newdir1

Example: Delete both the empty directories/root/newdir2 and/ROOT/NEWDIR2/NEWDIR3.

[Email protected] ~]# rmdir-p/root/newdir2/newdir3


This article extracts from "Linux Learning is not difficult" textbook, which is one of the most practical, theoretical and practicalLinuxIntroductory materials. To read the entire book, please visitLinuxoperation and Maintenance person(www.linuxywz.com) website.

"Linux learning is not difficult" file/directory Management (7): rmdir command to delete empty directories

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.