cat nifty-linux-oneliners.md
Nifty linux oneliners
This is a list of nifty oneliners I often use and just as often forget. Now I have a place to jot them down.
SSH public key creation
ssh-keygen -t rsa -C <user/machine/othercomment> -b 8192Sure-fire ssh public key propagation (includes directory creation)
cat .ssh/id_rsa.pub | ssh <username>@<serveraddress> "mkdir -p ~/.ssh && cat - >> ~/.ssh/authorized_keys"Reload the .Xresources file
xrdb -merge ~/.XresourcesRsync an entire file system to another machine
rsync -e 'ssh -ax' -aHvzl --numeric-ids --one-file-system --progress --compress <source> <user>@<destination>:<directory>Make a big file with random stuff in it for testing
dd if=/dev/urandom of=testfile.big bs=10MB count=200Use tar.gz through SSH:
# tar zcvf - /wwwdata | ssh root@wherever "cat > /backup/data.tar.gz"
Comments