Score:0

Why is rsync adding an extra level to my destination folder?

bt flag

Hail and well met!

This is m first time using rsync, and I'm not sure how to get the results I'm expecting.

I'm trying to rsync my music library and saved playlists. My two source folders are...

~/music/music
~/music/playlists

My destination is...

/mnt/windows/linuxMusic

What I expect to see in my destination is...

/mnt/windows/linuxMusic/music
/mnt/windows/linuxMusic/playlists

What I'm getting is...

/mnt/windows/linuxMusic/music/music
/mnt/windows/linuxMusic/music/playlists

My code is...

src=~/music
dest=/mnt/windows/linuxMusic

rsync --archive --delete --exclude '.directory' --progress --verbose $src $dest 2>&1

Where is that extra "/music" coming from and how can get rid of it?

TIA!

Score:4
cn flag

To obtain the effect you expect, add a trailing slash to each of your directories, i.e.

src=~/music/
dest=/mnt/windows/linuxMusic/

For rsync, the trailing slash makes a difference.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.