Linux - Notes and other scrabbles

Submitted by SneWs on Sat, 2015-09-05 17:47

My own notes and scrabbles relating to Linux, with a Ubuntu take on it.

SSH helpers

Copy your local SSH pub key onto a target servers authorized keys file. Obviously this will not work if you have turned off pwd auth. But this is a nice helper for bootstrapping a new server with allowed clients for example.

NOTE: The above command will not create the dir and file with the correct permissions, so it is preferable if you have the folder and file already created on your target to avoid this issue.

Rsync commands

# Sync from ~/Pictures to /data/green/snews/Pictures as the target
# We will use full compression here and we will make sure to only do deltas
# We will finally delete files from target based on what has been removed in source
$ rsync -rtvuc --delete-after ~/Pictures /data/green/snews/Pictures