niedziela, 25 stycznia 2015

How to use rsync to synchronize two folders without overriding permissions

Very popular and easy to remeber rsync command is rsync -a source_dir target_dir . "-a" is equivalent of "-rlptgoD". What does it mean?? Let's analyze it step by step.
  • "-r" - reqursive
  • "-l" - copy symbolic links as symbolic links
  • "-p" - preserve permessions
  • "-t" - preserve modification dates
  • "-g" - preserve group
  • "-o" - preserve owner (works only with root account)
  • "-D" - preserve device files and special files
So to do the same as "-a" does we need to ommit "-p" switch.
rsync -rltgoD m/bdg .

Brak komentarzy:

Prześlij komentarz