Create and delete folder files in Linux

Source: Internet
Author: User
Delete a folder in Linux -- RM, rmdir

Deleting a directory in Linux is very simple. Many people are still used to using rmdir. However, once the directory is not empty, it is deeply worried. Now we can use the RM-RF command.
You can simply use RM, but you need to add two parameters-RF: Rm-RF directory name
-R is recursive down. No matter how many levels of directories are there, delete them together.
-F means to delete the file directly without any prompts.

Delete a folder instance:

Rm-RF/var/log/httpd/Access

The/var/log/httpd/Access Directory and all files and folders under it will be deleted.

Note that you must be extremely careful when using this RM-RF. Linux has no recycle bin.

Of course, RM has more parameters and usage.

 

 

Create a folder: mkdir aaa

File Creation command: VI smaplefile.txt

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.