From 85c10a8db2f35a767bb88e12948bc738c46bb14c Mon Sep 17 00:00:00 2001 From: rfjakob Date: Thu, 9 Jun 2016 23:26:02 +0200 Subject: Updated Upgrading (markdown) --- Upgrading.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3