开发者

How to write ONE line of command that scp all the sub-directories in a directory to a remote machine

something like:

scp -r all_directories_in_current_directory fenix@xxxxx:~/data
开发者_运维技巧

anyone can give me a clue?


scp -r * fenix@xxxxx:~/data 

If you only want the directories, not the files in the current directory:

scp -r */ fenix@xxxxx:~/data 

This will not copy hidded(names startingwith a . ) directories.


Use rsync rather thsn scp, e.g.

$ rsync -av ./ fenix@xxxxx:data/


Do NFS mount, and do cp -avx.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜