How to copy in bash all directory and files recursive? How to copy in bash all directory and files recursive? bash bash

How to copy in bash all directory and files recursive?


cp -r ./SourceFolder ./DestFolder


code for a simple copy.

cp -r ./SourceFolder ./DestFolder

code for a copy with success result

cp -rv ./SourceFolder ./DestFolder

code for Forcefully if source contains any readonly file it will also copy

cp -rf ./SourceFolder ./DestFolder

for details help

cp --help


You might find it handy to keep your attributes set

cp -arf ./SourceFolder ./DestFolder