Rsync create symbolic links only Rsync create symbolic links only shell shell

Rsync create symbolic links only


It's not a symlink, but you might be able to work with --link-dest=DIR. It creates a hard link which will create a new name for the same file. This will behave similarly to a softlink as long as:

  • Both files are on the same filesystem
  • You don't plan to delete the original and not the copy (the symlink would break but a hard-link won't)
  • You don't have anything explicitly checking to see if it's a softlink


Can lndir be useful to you. According to manual it creates a shadow directory of symbolic links to another directory tree.


I think master_delivery is probably the best tool for this. With the already introduced --link-dest option of rsync, files which are not the same will be copied. If you don't mind the situation where copies and hardlinks are mixed, you can use rsync, but if you want to eliminate duplicates completely, use master_delivery.

Usage is:

gem install master_deliverymaster_delivery -m <path_to_master> -d <path_to_delivery_root>