Page 2 of 2

Re: [SOLVED] I found a minor flaw in my Rsync Back-Up strate

Posted: 28. Jul 2012, 23:07
by Shador
That's a bad solution as it omits hidden files. Have a look at this article: http://www.sant-media.co.uk/2010/05/lin ... o-another/

The solution for just copying the contents with cp:

Code: Select all

cp -a /old/. /new
This actually copies the ./ directory to new/./ but as new/./ is the same as new/ it does exactly what we want.

For mv it's way more complicated involving find as outlined in the article.

Re: [SOLVED] I found a minor flaw in my Rsync Back-Up strate

Posted: 28. Jul 2012, 23:51
by mimosa
Shador, that's an extremely helpful link. I'd forgotten about hidden files, but never came across the /. trick.