CP MV Install of the Gun/linux command

Source: Internet
Author: User

1. The CP command copies the shorthand for the copy command

Synopsis
CP [OPTION] ... [-T] SOURCE DEST

CP [OPTION] ... SOURCE ... DIRECTORY
CP [OPTION] ...-t DIRECTORY SOURCE ...

CP Source DEST The latter if it is a directory then the source files are copied into the folder and keep the original name, if the DEST is the name of the file, then the names of the copied files will be changed to this file name

CP Source.....directory Simultaneous copying of multiple sources so the target can only be a directory

Cp–t directory Source ..... Use the-t option to reverse the position of the target and source

Parameter-f Force if the filename exists then delete the file and then copy it, and copy it without prompting for overwrite

-R recursive replication commands for recursive replication Linux cannot replicate directories by default, so you must use this parameter for directory replication

-I interactive reminders

-P Copy the original file of the linked file

-L derefrence Copy only the original file

-P Uppercase Copy link file or link, keep original property

-A archive archive replication keeps all properties of the document intact

2.MV Mobile Command usage basic and CP similar

Different points 1 rename MV Source dest in the same directory rename one of the original

2 No recursive option to manipulate files or directories to operate properly

3. Install cannot copy directories, only files. Copied files have permissions, mainly used to make RPM packages

Synopsis
Install [OPTION] ... [-T] SOURCE DEST
Install [OPTION] ... SOURCE ... DIRECTORY
Install [OPTION] ...-t DIRECTORY SOURCE ...
Install [OPTION] ...-d DIRECTORY ...

DESCRIPTION
This-install program copies files (often just compiled) to destination locations you choose. If you want to download and install a ready-to-use package on a gnu/linux
System, you should instead is using a package manager like Yum (1) or Apt-get (1).

In the first three forms, copy source to DEST or multiple SOURCE (s) to the existing DIRECTORY, while setting permission mo  Des and Owner/group. In the 4th form, create all
Components of the given DIRECTORY (ies).

Mandatory arguments to long options is Mandatory for short options too.

--backup[=control]
Make a backup of each existing destination file

-B like--backup but does don't accept an argument

-C (ignored)

-C,--compare
Compare each pair of source and destination files, and in some cases, does not modify the destination on all

-D,--directory
Treat all arguments as directory names; Create all components of the specified directories

Create a Directory

-D Create all leading components of DEST except, and then copy SOURCE to DEST

-G,--group=group
Set group ownership, instead of process ' current group

-M,--mode=mode
Set permission mode (as in chmod), instead of Rwxr-xr-x

-O,--owner=owner
Set ownership (Super-user only)

-P,--preserve-timestamps
Apply access/modification times of SOURCE files to corresponding destination files

CP MV Install of the Gun/linux command

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.