Many file systems support "hard links" where a file appear under several different names. The names are all equally good and the underlying storage is only freed when all names are deleted.
Questions tagged [hardlink]
69 questions
59
votes
3 answers
What is the difference between a soft (symbolic) link and a hard link?
I hear that you can now create soft links in Vista too. So, what is the difference between a soft (symbolic) link and a hard link on UNIX/Linux/Vista?
Are there advantages of using one over the other? Or do they just serve two distinct purposes?
Aaron K
- 1,535
49
votes
6 answers
How do I view a file's hard links in Windows?
I've found a description of hard links and junctions in Windows, however I'd like to know ,from the Windows UI or command prompt, how I can view the hard links of a particular file or folder?
John K
- 1,793
30
votes
8 answers
How can I use rsync to duplicate a directory tree, creating hardlinks to files?
From time to time, I have to perform several large migration changes on data files on my server, and I'm looking for a good way to do this. I was thinking about using rsync to duplicate my directory structure starting at the root data folder,…
18
votes
5 answers
Is there a way to create a copy-on-write copy of a directory?
I'm thinking of a situation where I would have something that creates a copy of a directory, tweaks a few files, and then does some processing on the result. This wold be done fairly often, maybe a few dozen times a day. (The exact use case is…
BCS
- 1,085
13
votes
1 answer
Does rsync change file content (dealing with hardlinks)?
Imagine I have a file remote/A which syncs to local/A and local/B is a hardlink of local/A. Is there a threat that on a next remote/A change and synchronization rsync will not delete local/A but only replace/add some part to it, thus changing…
user619271
- 232
13
votes
5 answers
Some GUI for mklink?
Do you know some GUI tool to create Hardlinks/SoftLinks/Junctions?
Click Ok
- 956
11
votes
3 answers
How to mirror filesystems with millions of hardlinks?
We have one big problem at the moment: We need to mirror a filesystem for one of our customers. Thats usual not really a problem, but here it is:
On this filesystem there is one folder with millions of hardlinks (yes! MILLIONS!). rsync requires more…
Thomas Berger
- 1,720
10
votes
1 answer
Create a link to the Unix socket
Is there a possibility to create a hard link for an unix socket? I'm creating a jail and symbolic links won't work, so I'm looking for a solution, how to provide an unix socket inside chrootted environment.
The only idea I'm coming across is to use…
eRIZ
- 220
10
votes
2 answers
Break all hardlinks within a folder
I have a folder which contains a certain number of files which have hard links (in the same folder or somewhere else), and I want to de-hardlink these files, so they become independant, and changes to their contents won't affect any other file…
Suzanne Soy
- 278
10
votes
3 answers
how to create symbolic link (ln) between two partitions
I have two partitions on my Ubuntu 10.04.3 server.
partition 1: /mnt/storage/
partition 2: /var/www/myweb/
now when i run the following command
$ ln /mnt/storage/sourcefile.txt /var/www/myweb/linkedfile.txt
i got this
ln: creating hard…
Alaa Alomari
- 638
8
votes
4 answers
rsync with --hard-links freezes
I have a large directory called servers, which contains many hard-links made by rsnapshot. That means that the structure is more or less…
Adam Matan
- 14,084
7
votes
3 answers
How does logrotate interact with hard linked files?
I have a service which insists on keeping it's log files in terrible locations. After all efforts to change where it keeps them failed, my next idea was to create hardlinks to those files somewhere cleaner. This led me to a concern:
If I configure…
Scivitri
- 181
6
votes
1 answer
Recalculate Windows inherited ACLs for hardlinks
How do I get Windows to recalculate the inherited permissions of a file?
A tool (Mercurial) created multiple NTFS hardlinks to the same file from different directories.
I can see them using fsutil hardlink list. This does not change the ACLs of the…
Peter
- 171
6
votes
1 answer
Linux hardlink confusion
I am confused with Linux hard link,
I created a hardlink with this command on my Ubuntu box,
ln f1 f2
So f2 should be a hardlink of f1, but why I changed f2 with emacs and saved f2, f1 didn't change at all. My understanding is f1 was supposed to…
Weiwei
- 377
5
votes
2 answers
Get hardlink count for a file on Windows (without fsutil, which requires admin)
I have various files which I've created as hardlinks to others using mklink. I need a command I can use inside a batch file to determine which files in a given directory have only one link to it. I know fsutil hardlink list can show me the links,…
Display Name
- 831