copy without some folders
Copy a folder but leave out some of what is inside, like node_modules or .git.
files
steps
-
rsync -av --exclude='node_modules' src/ dest/copy src into dest without node_modules
-
rsync -av --exclude={'.git','*.log'} src/ dest/without several things
-
rsync -avn --exclude='node_modules' src/ dest/only show what would be copied (-n)
commands used
rsynccp
Each has a page in lore: lore rsync opens it.
add to the end of a file
Add lines to a file without replacing it, also to a file only root can write.
argument list too long
"Argument list too long" from rm, cp or mv: too many files for one command line. Hand them over in batches.
change permissions of a folder and everything in it
Give a folder, its subfolders and its files the permissions or the owner they need, without making them open to everyone.
check a file's permissions
See who may read, write and run a file or a folder, and why a path is refused.