ForYourOwnGood
ForYourOwnGood

Reputation: 40382

rsync output: what do the characters on the left mean?

I do not understand the output I am getting from rsync. Can someone help me out?

The output contains lines such as:

<f.st...... somefile.txt
<f+++++++++ someOtherfile.zip
.d..t...... someDir/

I do not understand what the options on the left mean.

Upvotes: 50

Views: 26883

Answers (5)

Alex North-Keys
Alex North-Keys

Reputation: 4363

The "+"s are explained in the rsync manpage as:

"The other letters in the string above are the actual letters that will be output if the associated attribute for the item is being updated or a "." for no change. Three exceptions to this are: (1) a newly created item replaces each letter with a "+", (2) an identical item replaces the dots with spaces, and (3) an unknown attribute replaces each letter with a "?" (this can hap‐ pen when talking to an older rsync)."

Upvotes: 3

tylerl
tylerl

Reputation: 30857

I've paraphrased here the relevant portion of the manpage for people who have trouble finding it:

The first character indicates what is happening to the file:

  • < means that a file is being transferred to the remote host (sent).
  • > means that a file is being transferred to the local host (received).
  • c means that a local change/creation is occurring for the item (such as the creation of a directory or the changing of a symlink, etc.).
  • h means that the item is a hard link to another item (requires --hard-links).
  • . means that the item is not being updated (though it might have attributes that are being modified).
  • * means that the rest of the itemized-output area contains a message (e.g. "deleting").

The second character indicates what type of directory entry it is. Specifically:

  • f for file
  • d for directory
  • L for symbolic link
  • D for device
  • S for special file (e.g. socket or fifo)

The remaining columns are described below:

  • c means either that a regular file has a different checksum or that a symlink, device, or special file has a changed value.
  • s means the size of a regular file is different and will be updated by the file transfer.
  • t or T:
    • t means the modification time is different and is being updated to the sender's value
    • T means that the modification time will be set to the transfer time
  • p means the permissions are different and are being updated to the sender's value
  • o means the owner is different and is being updated to the sender's value
  • g means the group is different and is being updated to the sender's value
  • . unused

The following columns may not be present, depending on your transfer options

  • a means that the ACL information changed
  • x means that the extended attribute information changed

Upvotes: 85

Chris Kruslicky
Chris Kruslicky

Reputation: 41

I believe that output comes from the '-i' flag, search the man page for 'itemize' a few times (or search for 'cryptic output') and it shows what all the flags mean:

  • < means that a file is being transferred to the remote host (sent).
  • f for a file
  • d for directory
  • s means the size of a regular file is different and will be updated by the file transfer.
  • t means the modification time is different and is being updated

Upvotes: 4

Reputation:

There is a good explanation in the man page, under itemize-changes:

http://www.samba.org/ftp/rsync/rsync.html

(Between mirrored archives of mailings lists and (perhaps out of date) copies of the documentation, it can be difficult to arrive at that page)

Upvotes: 5

Michiel Buddingh
Michiel Buddingh

Reputation: 5919

The version of rsync I have installed on my system does not give that kind of output (perhaps you can clarify the options you use?), but rsync tries to reduce the amount of data sent over the network by scanning the remote and local file for identical 'blocks' of data. That way, only the parts of the file that are actually different have to be sent over the line.

I think it's very likely that those characters you see in the left hand column are indicators for the block matching process. + may mean 'identical' (or ., I suppose), d, s and t may indicate blocks 'shifted' in offset.

Upvotes: 0

Related Questions