Linux Set Permissions During Copy

[Solved] Linux Set Permissions During Copy | Perl - Code Explorer | yomemimo.com
Question : linux set permissions during copy

Answered by : charlesalexandre-roy

# 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
}

Source : https://ostechnix.com/copy-files-change-ownership-permissions-time/ | Last Update : Wed, 13 Apr 22

Question : copy with permissions linux

Answered by : paras-suthar-darji

sudo cp -rp /source /destination

Source : | Last Update : Sat, 22 Jan 22

Answers related to linux set permissions during copy

Code Explorer Popular Question For Perl