Archive for November, 2012

Copying some files while preserving directory structure

To copy some select files (e.g. a/b/test.txt and a/c/test2.txt) while preserving the directory structure (a/b and a/c) you can use the following:

rsync -Rv a/b/test.txt a/c/test2.txt mybackupdir

With this command you end up having the following files:

mybackupdir/a/b/test.txt
mybackupdir/a/c/test2.txt

Via: Stackoverflow

Tuesday, November 13th, 2012 Uncategorized No Comments