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
.
精彩评论