6

I have a 2.5 TB of data that I want to put in a 2TB hard drive to mail somewhere. It's not hopeless, as a very large fraction of the data consists of duplicate files. I am considering using jdupes with the -H option, which will replace duplicate files with hardlinks to a single file.

Here's the problem: If I tar a directory containing multiple hard links to other files in the directory tree, will tar "reduplicate" them in the archive file?

Dan
  • 9,372
  • 5
  • 25
  • 39

2 Answers2

7

Probably a duplicate from Dereferencing hard links

By default, a single copy of hardlinked data should be included in your archive.

SYN
  • 2,793
  • 12
  • 19
2

If you are using Fedora / RHEL, there is a hardlink package that will clean those things up for you as well. Then, as others have noted, tar will only store a single one by default.

Aaron D. Marasco
  • 5,708
  • 24
  • 29