[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: copy directory tree, mapping to new owners



On Mon, Sep 13, 2021 at 11:45:02AM +1200, Richard Hector wrote:
> On 12/09/21 6:52 pm, john doe wrote:

[...]

> >If you are doing this in a script, I would use a temporary directory.
> >That way, in case of failure the destination directory is not rongly
> >modified.
> >
> >EG:
> >
> >$ rsync <src-dir> <tmp-dir>
> >
> >Make <tmp-dir> the way you want it to be.
> >
> >$ rsync <tmp-dir> <dest-dir>
> 
> That is true, but firstly it would require more available space [...]

This isn't necessary, as you could replace the second `rsync' by a `mv'
(provided your temp tree is on the same storage volume as your target
dir, that is).

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


Reply to: