Skip to content

Instantly share code, notes, and snippets.

@Raboo
Last active October 18, 2022 13:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raboo/9b23c55d454601e2b46d8d88d2e12141 to your computer and use it in GitHub Desktop.
Save Raboo/9b23c55d454601e2b46d8d88d2e12141 to your computer and use it in GitHub Desktop.
Command line snippets
# should be faster than rsync
# 1. receiver
nc -l 6001 | tar xvpP
# 2. sender
tar cfP - /etc/profile.d | nc ${HOST} 6001
# 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 aes128-gcm@openssh.com" --rsync-path="sudo rsync" root@hostname:/remote_src/ /local_dst
# 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