diff options
Diffstat (limited to 'Upgrading.md')
-rw-r--r-- | Upgrading.md | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Upgrading.md b/Upgrading.md index 274f4f6..7d7d578 100644 --- a/Upgrading.md +++ b/Upgrading.md @@ -25,4 +25,15 @@ $ shopt -s dotglob $ rsync -av /old/* /new ``` -The bash option `dotglob` makes sure that `/old/*` also matches hidden files (dotfiles).
\ No newline at end of file +The bash option `dotglob` makes sure that `/old/*` also matches hidden files (dotfiles). + +#### Space-efficient move + +If you don't have the space to store a copy of your data, you can use the `--remove-source-files` option to rsync. This will delete each file after it has been transferred. Note that `mv` is pretty dumb: it copies everything and only then deletes the source files, so you will still need twice the space. + +``` +$ shopt -s dotglob +$ rsync -av --remove-source-files /old/* /new +``` + +As above, `dotglob` makes sure that dotfiles in `/old/` are copied as well.
\ No newline at end of file |