Linux command Install

Source: Internet
Author: User

Install similar CP can set permissions at the same time (default settings file permissions Rwxr-xr-x)

simple use of the install command :

-T

-D

-D

-M

-O

-G

-P


Install [-T] SOURCE DEST ([-t] can be omitted)


Install file1 fe2 Copy file Fe1 to Fe2


Inatall SOURCE ... DIRECTORY (..... can represent multiple)


Install File1 TEST1/FILE11

Copy the File1 file to the Test1 directory and name it FILE11 (if FILE11 is already present in Test1, delete and create new)

Install File1 test1 (approximate to previous command)

Copy the File1 file to the Test1 directory and name it file1 (if File1 is already present in Test1, delete and create new)

install-d file1 tt3/file33

Create a new directory Tt3 and copy the File1 file to the TT3 directory and name it file33 (delete and create if tt3 already exists in file33)

install-d file1 tt3 = Install file1 tt3 (TT3 is directory)


Install-t DIRECTORY SOURCE ... (... Represent multiple)


Install-t Sese file11 file22 Copy the file File11 file22 to the Sese directory


Install-d DIRECTORY ... (... Represent multiple)


install-d test2/test3/test4 Creating a directory Test2/test3/test4


-M setting permissions by default is Rwxr-xr-x

-O Set Owner

-G setting owning group

- p copy with time stamp preserved


Install-p-d-m 0744 file1 test/test1/file1 (File1 already exists)

Equivalent:

Mkdir-p Test/test1

Cp-p file1 Test/test1/file1

chmod 0774 Test/test1/file1

The above may be disorderly, please don't be fooled.

This article from the "8921049" blog, reproduced please contact the author!

Linux command Install

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.