15 votes
Accepted

Does rsync change file content (dealing with hardlinks)?

With standard options, rsync will copy the new file assigning it a semi-random name, then it will rename the new file with the original name. In this process, no writes are directed at the original ...
shodanshok's user avatar
  • 49.1k
4 votes
Accepted

Windows hardlinks - why it consumes same space as original file

What makes you think there was no space released? # Before: 117 821 751 296 bytes free # After: 117 910 781 952 bytes free # Difference: 89 030 656 # Your file size: 89 028 146 You released ...
Gerald Schneider's user avatar
3 votes
Accepted

Does rsync preserve hardlinks on the destination when source files are identical but separate?

tl;dr: To preserve file level deduplication via hard links at the destination, run rsync with the --checksum option. Full answer, according to a series of experiments I did: If two files are not ...
Tilman Schmidt's user avatar
3 votes

Get hardlink count for a file on Windows (without fsutil, which requires admin)

FindLinks from Sysinternals is an alternative to fsutil that will show you hard links. https://docs.microsoft.com/en-us/sysinternals/downloads/findlinks
Sam Rueby's user avatar
  • 666
3 votes
Accepted

Get hardlink count for a file on Windows (without fsutil, which requires admin)

I don't know of any way in batch off hand, but for PowerShell, the Win32 API function GetFileInformationByHandle returns the BY_HANDLE_FILE_INFORMATION structure, which contains the nNumberOfLinks ...
HopelessN00b's user avatar
  • 53.9k
2 votes

Recalculate Windows inherited ACLs for hardlinks

I came across this question when looking for how to trigger permission recalculation, so partly I wanted to leave an answer so the next person could find out how to trigger recalculations, but the ...
PertinentDetail's user avatar
2 votes

have 2 folders on different disks behave as if they were 1 folder

If all you want to do is linearly allocate data across two block devices (disks, in this case) while presenting a single filesystem namespace, you could use LVM. Using a volume group with two physical ...
Spooler's user avatar
  • 7,086
2 votes

Does rsync preserve hardlinks on the destination when source files are identical but separate?

It preserves source hard links if you use the -H or --hard-links option That will not create hard links -- you'll have to do that after the fact by looking for files with the same checksum, deleting ...
mpez0's user avatar
  • 1,512
1 vote

NAS de-duplication best practices - how do hardlinks handle compression?

Replace as many duplicates as I can with hard links You can do that only if the duplicates files are never going to be changed; otherwise, the change would affect all hardlinked files. To avoid that, ...
shodanshok's user avatar
  • 49.1k
1 vote

ln: failed to create hard link: Too many links

In ext4 file systems the limit of hard links to a file that can be created is 65000 (rounding of 16bits)
LUCACAN's user avatar
  • 11
1 vote
Accepted

Why is rsync only hard linking some unchanged files?

More of a workaround than a solution, I now avoid using --perms/-p or anything that implies it. Obviously then my permissions are not copied across, but at least it doesn't think an unchanged file is ...
IpsRich's user avatar
  • 185
1 vote

Best way to find all hard links to a directory

Having a count of 3 is correct , when you have one sub-directory . If a directory have 5 sub-directories , you must have a count of 7 . In this example i suppose that /usr/bin/ does not have a sub-...
EchoMike444's user avatar
1 vote

have 2 folders on different disks behave as if they were 1 folder

There is no way, with the details you've provided, to just link the directories together and make them appear as one single directory. There are, however, solutions to your problem. The solutions ...
JDS's user avatar
  • 2,608
1 vote
Accepted

Hard or soft link is more useful in Linux?

More useful is a matter of opinion, both hard and soft links have very valid use cases but I usually create softlinks: Directories You can only create hard links to files and not to directories. ...
HBruijn's user avatar
  • 78.9k
1 vote
Accepted

Does rsync -H convert file to hard link on destination after deduplication on source?

Yes, however have these two considerations present: from freedup page "There are neither warranties nor guarantees for freedup working correctly" make sure to use --links as parameter for rsync, and ...
kamihack's user avatar
  • 312
1 vote

Is there a way to create a copy-on-write copy of a directory?

Try use one of UniouFS, AUFS or Overlay Filesystem (depends on which supported in Your distro) For example OverlayFS used by docker as one of drivers to merge layers Overlay Filesystem Overlaying ...
mmv-ru's user avatar
  • 714
1 vote

Is there a way to create a copy-on-write copy of a directory?

I find this question while searching a better solution instead of my current, which is like: cp -al SOURCEDIRNAME copy.SOURCEDIRNAME or find SOURCEDIRNAME -type d -exec mkdir -p copy.{} ';' find ...
n3ko's user avatar
  • 176
1 vote
Accepted

Why hasn't disk usage decreased by 6,728k after hard linking a file away?

daily.2/ruminant may still contain links to the same inode (13344429), so total size hasn't gone down as the space is still allocated and in use in that directory. A couple of related points: a) If ...
Dominic Cleal's user avatar
1 vote
Accepted

Is it possible to have orphaned hard links?

From my understanding, SnapRaid store file-level parity information and does not mess with lower block level devices. If so, it should be completely unrelated to how hard-link works. Basically, if ...
shodanshok's user avatar
  • 49.1k
1 vote

Is it possible to have orphaned hard links?

Hard links don't work across volumes. Therefore, if a volume disappears there can't, by definition, be an orphan hard link. Hard links are two directory entries that point to the same data blocks (...
TomOnTime's user avatar
  • 7,991
1 vote

Is it possible to have orphaned hard links?

I think you probably need to look at how SnapRaid works, but hardlinks can't link across partitions, never mind drives, so you won't see any "orphans" from that source.
Tom Newton's user avatar
  • 4,161
1 vote
Accepted

How do I grant users permission to create hard links (using GPO or registry entries)?

Easy answer: after much searching it seems as though it can't be done. Standard users cannot be allowed to create hard links in Windows 7.
snoopy91's user avatar
  • 243

Only top scored, non community-wiki answers of a minimum length are eligible