Skip to content

Instantly share code, notes, and snippets.

@wynemo
Created October 28, 2012 11:24
Show Gist options
  • Select an option

  • Save wynemo/3968373 to your computer and use it in GitHub Desktop.

Select an option

Save wynemo/3968373 to your computer and use it in GitHub Desktop.
运维
#/tmp/foo_dir -> ubuntu12:/tmp/foo_dir/
#--delete delete extraneous files from destination dirs
#--delete-excluded also delete excluded files from destination dirs
#--exclude=PATTERN exclude files matching PATTERN
rsync -avzP --delete --exclude=".svn" --delete-excluded /tmp/foo_dir/ ubuntu12:/tmp/foo_dir/
# .ssh/config/
Host ubuntu12
User user1
HostName 192.168.56.2
IdentityFile ~/.ssh/id_rsa
Host superlinode
User user2
HostName dabin.info
Port 8888
IdentityFile ~/.ssh/linode_rsa
ProxyCommand ssh ubuntu12 nc %h %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment