Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 am performing a dry run using Rsync on 2 different boxes.

While i'm doing that, Under destination directory, I want a specific directory x to be ignored for sync.

Please let me know the exact pattern to ignore the directory.

The current command I'm using is:

rsync -avnc --delete $LOCAL_DIR $USERNAME@$DESTINATION_IP:$REMOTE_DIR

under DESTINATION_IP, I would want to ignore a particular directory under REMOTE_DIR.

share|improve this question

If you looked at the arguments for rsync, you would have seen:

--exclude=PATTERN       exclude files matching PATTERN

So with that, I would suggest the following dry run:

rsync -avnc --delete --exclude=x $LOCAL_DIR $USERNAME@$DESTINATION_IP:$REMOTE_DIR

cheers

sc.

share|improve this answer

Check out the --exclude parameter.

share|improve this answer
    
Details? You're essentially saying, "go read the man page". – Isaac Rabinovitch Nov 4 '12 at 1:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .