DEV Community

Lam
Lam

Posted on

2 2

Rsync Cheat Sheet

Archive options

-a, --archive    # archive (-rlptgoD)
Enter fullscreen mode Exit fullscreen mode
-r, --recursive
-l, --links      # copy symlinks as links
-p, --perms      # preserve permissions
-t, --times      # preserve times
-g, --group      # preserve group
-o, --owner      # preserve owner
-D               # same as --devices --specials
Enter fullscreen mode Exit fullscreen mode
--delete         # Delete extra files
Enter fullscreen mode Exit fullscreen mode

Include options

--exclude=PATTERN
--include=PATTERN
Enter fullscreen mode Exit fullscreen mode
--exclude-from=FILE
--include-from=FILE
--files-from=FILE    # read list of filenames from FILE
Enter fullscreen mode Exit fullscreen mode
-C, --cvs-exclude    # exclude from local/global .cvsignore
Enter fullscreen mode Exit fullscreen mode

Backup options

-b, --backup           # backup with suffix
    --suffix=SUFFIX    # default ~ without --backup-dir
    --backup-dir=DIR
Enter fullscreen mode Exit fullscreen mode

Skipping options

-u, --update     # skip files newer on dest
-c, --checksum   # skip based on checksum, not mod-time & size
Enter fullscreen mode Exit fullscreen mode

Display options

-q, --quiet
-v, --verbose
    --stats
-h, --human-readable
    --progress
-P                     # same as --partial --progress
Enter fullscreen mode Exit fullscreen mode

Transfer options

-z, --compress
-n, --dry-run
    --partial   # allows resuming of aborted syncs
    --bwlimit=RATE    # limit socket I/O bandwidth
Enter fullscreen mode Exit fullscreen mode

OSX

--exclude '.Trashes'
--exclude '.Spotlight-V100'
--exclude '.fseventsd'
Enter fullscreen mode Exit fullscreen mode

Basic example

# syncing folder src into dest:
rsync -avz ./src /dest
# syncing the content of src into dest:
rsync -avz ./src/ /dest
Enter fullscreen mode Exit fullscreen mode

Reference

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs