Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] rsync syntax help
  • From: "Hylton Conacher(ZR1HPC)" <hylton@xxxxxxxxxxxxxx>
  • Date: Sat, 01 Apr 2006 22:15:35 +0200
  • Message-id: <442EDF67.5000203@xxxxxxxxxxxxxx>
Jim Cunning wrote:
On Wednesday 29 March 2006 13:34, Ken Schneider wrote:

I would use rsync -varpltz --stats /home/hylton/ /media/backup/home

Make sure you include a closing / on the source so that you get a
recursive copy.

That's not what the closing / does. According to the man page, a trailing / on the source changes the behavior so that "You can think of a trailing / on a source as meaning 'copy the contents of this directory' as opposed to 'copy the directory by name' " Recursive copying is controlled by -r.

In your example, the contents of /home/hylton would be copied to /media/backup/home. There would be no /media/backup/home/hylton directory created--probably not what the OP expects.
Wow Jim tnx. How'd you know the OP didn't want it as you were right on the money :)

So by leaving the src / off I get the /home/hylton directories in /media/backup?
Hylton Conacher - Linux user # 229959 at
Currently using SuSE 9.2 Professional with KDE

< Previous Next >