Answers for "linux set permissions during copy"

1

linux set permissions during copy

# Basic syntax:
install -m 755 /source/file.txt /destination
# Where:
#	- -m specifies the permission assigned to file.txt upon copy
# Note, install seemingly can't copy directories and files recursively, would
#	probably need to come up with some sort of "find...exec" command for that

# For ease of use, you can put this function in your bashrc file:
function ccp() {
	install -m 755 $1 $2
}
Posted by: Guest on April-06-2022
0

copy with permissions linux

sudo cp -rp /source /destination
Posted by: Guest on January-15-2022

Code answers related to "linux set permissions during copy"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language