1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-16 02:40:08 +00:00
ohmyzsh/plugins/cp/README.md
Xuehai Pan 358ac6a141
fix(cp): add unique suffix to rsync backup directory for each user (#10170)
* fix(cp): add unique suffix to rsync backup directory for each user

* fix(cp): use `USERNAME` rather than `USER`
2021-09-09 22:18:09 +02:00

32 lines
748 B
Markdown

# cp plugin
This plugin defines a `cpv` function that uses `rsync` so that you
get the features and security of this command.
To enable, add `cp` to your `plugins` array in your zshrc file:
```zsh
plugins=(... cp)
```
## Description
The enabled options for rsync are:
- `-p`: preserves permissions.
- `-o`: preserves owner.
* `-g`: preserves group.
* `-b`: make a backup of the original file instead of overwriting it, if it exists.
* `-r`: recurse directories.
* `-hhh`: outputs numbers in human-readable format, in units of 1024 (K, M, G, T).
* `--backup-dir="/tmp/rsync-$USERNAME"`: move backup copies to "/tmp/rsync-$USERNAME".
* `-e /dev/null`: only work on local files (disable remote shells).
* `--progress`: display progress.