Analysis of Linuxtouch, mkdir, and rmdir

Source: Internet
Author: User
Linuxtouch, mkdir, rmdir analysis 1. touchfile1 is used to create an empty file file1. if the folder already exists, modify the last access time of the file. Www.2cto. com2.mkdirfirst is used to create the first folder, which is located in the current folder. 3. mkdir /...
Linux touch, mkdir, rmdir analysis 1. touch file1 is used to create an empty file file1. if the folder already exists, modify the last access time of the file. Www.2cto.com 2. mkdir first is used to create the first folder, which is located in the current folder. 3. add the absolute path after the mkdir/home/sara/first/second command, provided that the first folder has been created; otherwise, run the 4 command, as shown below, and add "-p ". 4. mkdir-p first/second/third is used to create a series of folders. if the second folder is not created, this command will first create the second folder and then create the third folder. Www.2cto.com 5. rmdir third this command deletes the third folder, provided that it is in the upper-level directory of third. 6. rmdir/home/sara/fist/second add an absolute path after the command to delete the second folder. If you are in the sara directory, you can change the command to rmdir first/second. 7. rmdir-p first/second multi-level deletion: first, delete the second Directory. after deletion, if the first directory is empty, you can continue to delete the first directory. for example: mkdir-p sara/first/second/third/fourth delete: rmdir-p sara/first/second/third/fourth
 

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.