case1: on the same server, copy all the contents of a folder to another folder
#如果dir2不存在
cp -r dir1 dir2
#如果dir2已存在
cp -r dir1/. dir2
case2: In the two servers, copy all the contents of a folder to a file server to another folder
#如果dir2不存在
scp -r [email protected]:/path/dir1 /path/dir2
#如果dir2已存在
scp -r [email protected]:/path/dir1/. /path/dir2
To be continued