Touch, MV, CP, RM in Linux

Source: Internet
Author: User

touch    new file touch  filename such as:touch file1           New file named File1 in the current directory Note: 1) The same directory cannot create a file with the same name 2) the file name of Linux is case-sensitive mv       Modify the file name (or the name of the directory), move the path mv   old file name    new file name    ======= Modify the file name mv   old directory name     New directory name    ======= "Modify directory name mv   file name        directory name        ======= "Move path cp  ( copy abbreviation)   Copy file (directory) 1)  cp  source file name    Target file name cp file1 file2   Copy the file file1 the current directory to file22)  cp  source file name    destination directory name 3)  CP   Source directory name    destination directory name cp -r dira dirb    copy all contents of Dira directory to DIRB where,-R is recursive replication 4)  cp -i file2 dira if Dira below has the same name as the file file2, then join-I will ask you if you are sure to overwrite the original file before deleting note: CP commonly used options are,-i,-r,-f,-d and so on. rm  (remove ) Delete file or directory 1) rm file12)  rm -i file2    ask you to confirm whether to agree to delete before deleting Y agrees; n means undelete 3)  rm -r dira   Delete directory dira4)  RM -IR DIRB Note: 1. Delete the file (directory) before asking yourself, whether the file (directory) can be deleted 2.rm commonly used parameters,-i,-r,-f and so on. 


This article from "Van Gogh said my brain is sick" blog, declined reprint!

Touch, MV, CP, RM in Linux

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.