---
title: "use \"--links\" option of rsync "
author: "standalone"
date: "2013-05-23T10:45:25Z"
tags: []
categories: ["操作系统"]
slug: "use-links-option-of-rsync"
draft: false
lastmod: "2013-05-23T10:45:25Z"
id: 1873923
url: "https://standalone.iteye.com/blog/1873923"
---

Today I used rsync to copy some files but I found for symbolic links it will ignore them if you just use simple command line:

rsync SRC DEST

With google, I finally figure out I need to add the "--links" option.


>        --copy-links
>               Turn all symlinks into normal files (leaving no symlinks for any
>               other options to affect).
> 
>        --links --copy-unsafe-links
>               Turn all unsafe symlinks into files and duplicate all safe  sym-
>               links.
> 
>        --copy-unsafe-links
>               Turn  all unsafe symlinks into files, noisily skip all safe sym-
>               links.
> 
>        --links --safe-links
>               Duplicate safe symlinks and skip unsafe ones.
> 
>        --links
>               Duplicate all symlinks.