m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rsync.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/rsync.md b/rsync.md
new file mode 100644
index 0000000..9e2c2a3
--- /dev/null
+++ b/rsync.md
@@ -0,0 +1,23 @@
+# rsync
+
+ rsync from/dir to/location
+
+Copies files, creating `to/location/dir`
+
+ rsync from/dir/ to/location
+
+Copies the contents of `from/dir` to `to/location/`
+
+## Options
+
+Basic ones:
+
+- `-r/--recursive`: recurses directories
+- `-v/--verbose`: increases verbosity
+- `--delete`: deletes files from destination that weren't in the source
+- `-z/--compress`: compress files during transfer
+
+### -a / --archive
+
+Turns on `-rlptgoD`. So recursive (`-r`), and preserves a bunch of stuff like
+soft links, permissions, owners, modification times, special files.