From bb886469209ee05bae503f8fc26e5a8ac752c449 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Mon, 31 Jul 2023 01:34:29 +0700 Subject: [PATCH] feat: add rsync pastebin --- posts/2023-07-01-pastebin.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/posts/2023-07-01-pastebin.md b/posts/2023-07-01-pastebin.md index 3c79211..8bbcf14 100644 --- a/posts/2023-07-01-pastebin.md +++ b/posts/2023-07-01-pastebin.md @@ -258,6 +258,27 @@ Run: instaloader +login.txt +args.txt +targets.txt ``` +## [rsync](https://github.com/WayneD/rsync) + +```sh +# Result is dst/src +rsync -azP src dst + +# Result is dst/* with * is from src +rsync -azP src/ dst +``` + +Commonly flags: + +- `-z`: compress +- `-P`: enable both `--partial`, `--progress` to easily resume after interupt +- `-n`: dry run + +Be careful flags (need dry run if not sure): + +- `-u`: skip if files in **dst** is already newer than in **src** +- `--delete`: delete files in **dst** if not exist in **src** + ## [F2](https://github.com/ayoisaiah/f2) Rename: