Questions tagged [hardlink]

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.

67 questions
60
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,505
  • 5
  • 18
  • 16
45
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,673
  • 3
  • 16
  • 20
29
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,…
16
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,065
  • 2
  • 15
  • 24
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
  • 1
  • 6
13
votes
5 answers

Some GUI for mklink?

Do you know some GUI tool to create Hardlinks/SoftLinks/Junctions?
Click Ok
  • 956
  • 4
  • 12
  • 18
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,700
  • 12
  • 22
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
  • 2
  • 10
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
  • 5
  • 18
  • 37
9
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
  • 268
  • 2
  • 11
7
votes
3 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
  • 12,504
  • 19
  • 54
  • 73
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
  • 5
6
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
  • 171
  • 1
  • 4
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
  • 367
  • 1
  • 5
  • 10
5
votes
7 answers

Linux: Best-practices for Hard Linking?

I've used hard links in the past, but they seem to make a bit of a mess of things... When is the proper time to use Hard links? What are the best practices for when and where to use hard linking? Thanks, Dan
Dan
  • 155
  • 1
  • 5
1
2 3 4 5