A hard link is a directory entry that associates a name with a file or directory on the file-system, in effect creating an alias that may reside elsewhere on the file-system.
Questions tagged [hardlink]
193 questions
167
votes
12 answers
How can you see the actual hard link by ls?
I run
ln /a/A /b/B
I would like to see at the folder a where the file A points to by ls.
Léo Léopold Hertz 준영
- 5,924
108
votes
4 answers
What is the difference between NTFS hard links and directory junctions?
The title says it all... what's the difference? When do I use one and when do I use the other?
Added: Note that Junction points, Hard links and Symbolic (soft) links are three separate things on NTFS.
Vilx-
- 4,237
58
votes
3 answers
Make a hard link without extra programs in Windows 7
My objective here is to synchronize my emule credit file (application.dat?) by Dropbox. But the credit file is not inside the Dropbox directory (by default). So I want to make a hard link to get this objective done.
I know I can make a hard link by…
user69835
55
votes
5 answers
Creating the equivalent of Soft and Hard Links in Windows
Is it possible to link two files or folders without having a different extension under Windows?
I'm looking for functionality equivalent to the soft and hard links in Unix.
Cookie
- 713
- 1
- 8
- 13
50
votes
9 answers
How can I find hard links on Windows?
I've created some hard links on my Windows 7 file system using mklink. It was some time ago and I can't remember for sure where, or which files. When I use Explorer, all files look the same. When I use the command line and type "dir", they all look…
MM.
- 683
45
votes
3 answers
Using mklink /h results in "Access is denied."
From command prompt with Administrator privilages:
c:\>mklink /h c:\dirA c:\Users\Piotr\dirB
Access is denied.
I'm on Vista x64. Using /j or /d instead of /h works. What's the problem?
Related:
Access is denied error, when I mklink on Windows 7.
Piotr Dobrogost
- 5,914
41
votes
6 answers
How to replace all duplicate files with hard links?
I have two folders containing various files. Some of the files from the first folder have an exact copy in the second folder. I would like to replace those with a hard link. How can I do that?
qdii
- 1,107
35
votes
3 answers
How can I find all hardlinked files on a filesystem?
I need to find all hardlinked files on a given filesystem. E.g. get a list of files, each line contains linked pairs, or triplets, etc.
I understand more or less how to do it, one needs to create a dictionary keyed by inode for all…
haimg
- 23,153
- 17
- 83
- 117
31
votes
3 answers
Can I hard link files with rsync instead of copying them?
cp -l hard links files instead of copying them, saving filesystem space. I need to use rsync instead of cp because of its --exclude capabilities.
So my question is, how do I get rsync to hard link files instead of copying them? Obviously, this is a…
nnyby
- 1,509
28
votes
2 answers
How to create a directory hard link in Windows?
I was trying to create a directory hard link (not a symbolic one).
I've tried this: mklink /d /h newfolder currentfolder but it's telling me Access is denied. I don't understand how is access denied because I'm running batch as administrator.
How do…
Pacerier
- 28,143
20
votes
4 answers
Using NTFS hard links to combine full/differential backups
Short: Is it possible to (robo)copy a directory tree using hard links instead of physical copy?
I want to make a daily backup of my data files, every day in it's own directory. Now most files don't change every day, so my idea to speed up backup and…
Sam
- 2,154
20
votes
8 answers
How can I check the actual size used in an NTFS directory with many hardlinks?
On a Win7 NTFS volume, I'm using cwrsync which supports --link-dest correctly to create "snapshot" type backups. So I have:
z:\backups\2010-11-28\cygdrive\c\Users\...
z:\backups\2010-12-02\cygdrive\c\Users\...
The content of 2010-12-02 is mostly…
kbyrd
- 2,256
16
votes
5 answers
How to delete Windows NTFS hard link (mklink /h) while original is in use?
On a Windows NTFS file system, I have a file (say, orig.mp3). I open this file, through this path orig.mp3, in such a way that it is in use (say, by playing it in VLC).
Then I create a hard link (cmd /c mklink /h link.mp3 orig.mp3). This results…
15
votes
3 answers
Windows7 hardlink over two different drives
I am trying to create a hardlink on my C drive that points to a file on my D drive. I open up a terminal with Administrator privileges and try the following:
C:\Users\sandro>mklink /H _vimrc D:\sandro-desktop\.vimrc
The error that I get is:
The…
Sandro
- 539
14
votes
5 answers
Copy to another NTFS disk and preserve hard links
I have to copy directory structure from one local NTFS disk to another (Windows 7+) and preserve hard links that exist within this directory structure.
An acceptable solution would be to replace hard links with (relative) symbolic links before copy,…
Estus Flask
- 173