Re: Duplicating a partition's directory structure - How?
On 2017-01-03 05:13 -0600, Richard Owlett wrote:
> I wish to duplicate a partition's directory structure without any of
> the existing file contents. The immediate application is a heavily
> customized version of an installation DVD. There are two underlying
> goals. I wish to reuse some existing utilities which expect to find
> data in a particular branch of the directory tree. The second is very
> similar in that a person familiar with a structure would assume that
> certain types of information will be in a particular sub-directory.
>
> Also this will be an educational experience as I expect the answer
> will be elegant in its simplicity and point me towards chasms in my
> understanding of Linux.
Found this solution on [1], it seems to work.
$ rsync -a -f"+ */" -f"- *" source/ destination/
Cheers,
Sven
1. http://psung.blogspot.com/2008/05/copying-directory-trees-with-rsync.html
Reply to: