rsync question

S

ssar17

Guest
I am now using

rsync -avtuW /Volumes/BAUERBKUP/Documents/College/Capella/ /Users/dbauer/Desktop/OneDrive/Documents/Capella

it seems to copy updated files into the OneDrive/Documents/Capella properly but it also is creating another folder called Capella under Capella with everything. I do not want that. I am just trying to copy newer files from the USB stick into the OneDrive account. I added the u for only updated files and the W for whole files. I am not sure the t is needed with the a or not.

Any help would be appreciated.

BAUERBKUP is my USB stick

:[
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
From the manpage for rsync (man rsync)

A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as mean-
ing "copy the contents of this directory" as opposed to "copy the directory by name", but in both cases the attributes of the containing directory are transferred to the
containing directory on the destination. In other words, each of the following commands copies the files in the same way, including their setting of the attributes of
/dest/foo:

rsync -av /src/foo /dest
rsync -av /src/foo/ /dest/foo

So I'd think your command is correct. I generally do the top command. I'd leave the archive flag personally.. I generally use -ua after a -uan dry run
 
Last edited:
OP
S

ssar17

Guest
sync -avtuW /Volumes/BAUERBKUP/Documents/College/Capella/ "$HOME"/Desktop/OneDrive/Documents/Capella

This works. I went to my USB stick and there was a second folder Capella under Capella. Want a dummy I am! I am not sure how that got on my USB stick.

The above command works now just fine. Thanks to all who helped. I knew the syntax had to be correct for all that I read.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top