Skip to content

Instantly share code, notes, and snippets.

View s-ashwinkumar's full-sized avatar

Ashwin Kumar Subramanian s-ashwinkumar

View GitHub Profile
@s-ashwinkumar
s-ashwinkumar / RsyncSSH.md
Created August 21, 2017 16:52 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@s-ashwinkumar
s-ashwinkumar / cla_script.sh
Created September 13, 2017 07:06
Sample to show how to use getopt
#!/bin/bash
# 'arg-x' and 'x' behave like flags
# 'arg-y' and 'y' have required arguments.
# 'arg-z' and 'z' have optional arguments
# Initial value for the flag parameter (default false)
X=0
# create the option string