On Tuesday, 26 March 2024 00:37:31 GMT Dale wrote:
> Michael wrote:
> > On Monday, 25 March 2024 02:58:21 GMT Dale wrote:

> >> I did this with the following command earlier.
> >> 
> >> rsync -av --progress --delete  /var/cache/portage/tree/*
> >> /backup/gentoo-build/var/cache/portage/tree/
> > 
> > Your syntax for the source tree will fail to copy a couple files
> > immediately under /var/cache/portage/tree/ which start with "."
> > 
> > It would be better if you used:
> > 
> > /var/cache/portage/tree /backup/gentoo-build/var/cache/portage/tree
> 
> I edited that in my little script.  The locations with rsync can be
> tricky.  Each way that one can use gives a slightly different execution.

Oops!  Scratch that - I was wrong.  Sorry!

This is what will work:

/foo/ /backup/foo

will copy the contents of source /foo into destination /backup/foo, without 
copying the top level directory /foo itself.  This way both /foo at source and 
/backup/foo at destination will have identical content.

If you omit a trailing slash you'll copy the source top level directory itself 
and will get:

/backup/foo/foo/...

which NOT what you're after.

Hope this helps.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to