Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. scp file.txt user@ip-1.com:, user@ip2.com:
  2.  
  3. for dest in $(<destfile.txt); do
  4. scp ourfile.txt ${dest}:remote/path/
  5. done
  6.  
  7. cat file.txt | tee >(ssh user@ip1.com "cat > file.txt")
  8. >(ssh user@ip2.com "cat > file.txt")
  9.  
  10. tar cz file1 file2 file3 | tee >(ssh user@ip1.com "tar xz")
  11. >( ... )
  12.  
  13. pdsh -w^destfile.txt scp hostname:/path/to/file /path/to/destfile
  14.  
  15. cscp.sh 20337.patch < hosts.txt
  16.  
  17. #!/bin/bash
  18. while read host; do
  19. scp $1 ${host}:
  20. done
  21.  
  22. project-prod-web1
  23. project-prod-web2
  24. project-prod-web3
  25.  
  26. cscp.sh file < hosts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement