Linux File Management Command Cp,mv,install (note)

Source: Internet
Author: User
Tags tmp folder

CP command used to copy files and folders

Cp/etc/passwd/tmp Copy the/etc/passwd file to the/tmp folder and name passwd with the original file name

cp/etc/passwd/tmp/123 Copy the/etc/passwd file to the/tmp folder under file name 123

Cp-r/etc/ssh/tmp This command is used to replicate the directory

Cp-f Force This command is a secondary command that forces the file to be copied to the specified directory or file, delete it, and copy the source, even if the directory folder has the file or directory.

Cp-p This command is copied to the directory folder or file with the owner group permission of the file.

Cp-a This command is to copy all the properties of a file to the destination directory or file.


MV This command is used to move (under window called cut) file or directory

Mv/etc/ssh/tmp used to move the/etc/ssh folder to the/tmp folder

Mv/etc/ssh/tmp/ssh is to move the directory/etc/ssh to the/tmp/ssh folder (remember not to overwrite but/tmp/ssh/ssh)


Install this command is used to compile the use, here only to do a brief introduction

install-d/tmp/123/tmp/456 or install-d/tmp/{123,456} This command is used to create 123 and 4,562 folders in the/tmp directory.

Install/etc/passwd/tmp copy files But the file has execute permissions.


Linux distributions and comparison with icons:

Centos:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/7B/wKiom1TUMmbzQzK1AABOyemkTpQ370.jpg "title=" CentOS "alt=" Wkiom1tummbzqzk1aaboyemktpq370.jpg "/>


Debian:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/78/wKioL1TUM1SjFlwUAAA8MAVQEyw013.jpg "title=" Debian "alt=" Wkiol1tum1sjflwuaaa8mavqeyw013.jpg "/>

Fedora:

650) this.width=650; "style=" width:150px;height:150px; "src=" http://s3.51cto.com/wyfs02/M02/59/7B/ Wkiom1tummftpo9saacfxbapnuc933.jpg "title=" Fedora "border=" 0 "height=" "hspace=" 0 "vspace=" 0 "width=" alt= " Wkiom1tummftpo9saacfxbapnuc933.jpg "/>

Redhat:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/78/wKioL1TUM1SAdIHYAABRSQG1u_E658.jpg "title=" Redhat "alt=" Wkiol1tum1sadihyaabrsqg1u_e658.jpg "/>

Suse:

650) this.width=650; "style=" width:150px;height:158px; "src=" http://s3.51cto.com/wyfs02/M00/59/7B/ Wkiom1tummfqgdkwaaemu4wem_g511.jpg "title=" Suse "border=" 0 "height=" 158 "hspace=" 0 "vspace=" 0 "width=" alt= " Wkiom1tummfqgdkwaaemu4wem_g511.jpg "/>



Linux File Management Command Cp,mv,install (note)

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.