Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on some intense rsync scripts, and I really want to understand the options at my disposal. In general the man page is the best place for information, with dense and precise prose. One notable omission is the description of the show and hide filters. They appear in this table in the FILTER RULES section:

exclude, - specifies an exclude pattern.
include, + specifies an include pattern.
merge, . specifies a merge-file to read for more rules.
dir-merge, : specifies a per-directory merge-file.
hide, H specifies a pattern for hiding files from the transfer.
show, S files that match the pattern are not hidden.
protect, P specifies a pattern for protecting files from deletion.
risk, R files that match the pattern are not protected.
clear, ! clears the current include/exclude list (takes no arg)

The only other reference is in the rule modifier description section:

An s is used to indicate that the rule applies to the sending side.  When
a  rule  affects  the  sending  side, it prevents files from being trans-
ferred.   The  default  is  for  a  rule  to  affect  both  sides  unless
--delete-excluded  was  specified,  in  which  case  default rules become
sender-side only.  See also the hide (H) and show (S) rules, which are an
alternate way to specify sending-side includes/excludes.

That seems to indicate they are the same, but sender-side only. Is that the only difference? What are the implications of that? Does it only affect the way deletes are handled?

share|improve this question

migrated from Aug 30 '11 at 6:56

This question came from our site for professional and enthusiast programmers.

Nice to see the full list of options. Thanks – Felipe Alvarez Jun 6 '14 at 0:08
up vote 9 down vote accepted

I found a useful answer to this question here:

In short, the main difference is that with exclude, the file does not get sent but the receiver is notified that there is such a file and it shouldn't delete it if one of the delete options is used. On the other hand, when the file is hidden, the sender completely ignores it which means the receiver has no information whatsoever about the existence of the file.

In other words, when you just exclude a file, it is protected, whereas when you hide it, it is not. (Unless you override this behavior with --delete-excluded.)

share|improve this answer
Great answer thanks. – dasil003 Mar 13 '12 at 13:27
excellent answer – Felipe Alvarez Jun 5 '14 at 4:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.