Skip to content

Instantly share code, notes, and snippets.

@ncimino
ncimino / gist:147a9e33e6beccf351f2
Created August 10, 2014 00:10
Quickly find total size (in bytes) of all files matching pattern
find /path/to/files -type f -print0 | xargs -0 ls -l | awk '{x+=$5} END {print "total bytes: " x}'
@ncimino
ncimino / gist:0536da3dd0597b411131
Created August 10, 2014 00:21
Syncing parts of directories with rsync
# sync all files starting with 0-9 or a-n or A-N
rsync -vram -f'+ [0-9a-nA-N]*' -f'+ */' -f'- *' /src /dest1
# sync all files starting with m-z or M-Z
rsync -vram -f'+ [m-zM-Z]*' -f'+ */' -f'- *' /src /dest2
fconfigure $fd_bit -translation binary
@ncimino
ncimino / key-fingerprint
Created July 26, 2016 13:09 — forked from yosemitebandit/key-fingerprint
view your ssh public key's fingerprint; compare this to what Github has listed in the ssh key audit
$ ssh-keygen -l -f /path/to/keys/id_rsa.pub
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA)