tired of typing long paths

Matt McCutchen matt at mattmccutchen.net
Wed Mar 12 13:23:41 GMT 2008


On Wed, 2008-03-12 at 08:25 -0400, Neal Becker wrote:
> rsync /usr/share/xemacs/blah/bla dest:/usr/share/same/long/path/here
> 
> Wouldn't it be nice to have an option to just say:
> 
> rsync --same-path /some/long/local/path dest:

Two ways to do this:

1. Use --relative (but this may affect anchored filters if you use any):

rsync --relative /some/long/local/path dest:/

2. Use bash's brace expansion:

rsync {,dest:}/some/long/local/path

Matt



More information about the rsync mailing list