Last active
October 18, 2022 13:41
-
-
Save Raboo/9b23c55d454601e2b46d8d88d2e12141 to your computer and use it in GitHub Desktop.
Command line snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# should be faster than rsync | |
# 1. receiver | |
nc -l 6001 | tar xvpP | |
# 2. sender | |
tar cfP - /etc/profile.d | nc ${HOST} 6001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# favorite rsync syntax, optimized for speed. | |
# rsync-path/sudo part is if you don't have read permissions, requires passwordless sudo I would assume. | |
# can use following script to find fasted ssh cipher https://gist.github.com/dlenski/e42a08fa27e97b0dbb0c0024c99a8bc4 | |
rsync -rlptgoW --inplace --numeric-ids --info=progress2 -e "ssh -A -T -o Compression=no -x -c [email protected]" --rsync-path="sudo rsync" root@hostname:/remote_src/ /local_dst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# should be faster than rsync | |
# 1. receiver | |
socat TCP-LISTEN:6001 - | tar xvpP | |
# 2. sender | |
tar cfP - /etc/profile.d | socat TCP:${HOST}:6001,sndbuf=33554432 - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment