'rsync' and parent directory question

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Sep 14 00:14:37 UTC 2004


Hi all,

   Is there a way to tell 'rsync' to duplicate the parent directory of a 
file MINUS the mount point? For example, say I have a filesystem mounted at:

/mnt/dir1/

and within it I have a subdirectory like:

/mnt/dir1/path/to/file.txt

and I want to copy 'file.txt' to another mounted filesystem mounted at:

/mnt/dir2/

while preserving the parent dir:

/path/to

So that I get:

/mnt/dir2/path/to/file.txt

   How could I do this? As I understand it by using '-R' (relative) 
'rsync' will create:

/mnt/dir2/mnt/dir1/path/to/file.txt

   This obviosuly is cumbersome and ugly. Have I understood this wrong 
or missed an obvious solution? I hope not, I would feel foolish if I did. :p

Thanks as always!

Madison
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list