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