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?
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, creating hard links to all original the files (some of them are rather big), and I can overwrite in the destination tree only the files that need migrating. In the end, I can safely switch from the old files to the new files with two mv
operations.
However, I can't seem to get rsync to do this. I tried
rsync -a --link-dest=$DATA $DATA $DATA/../upgrade_tmp
but instead of creating hard links to files, rsync copies them entirely. Is there a problem using the same source and link-dest 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 testing patch submissions; dupe the code, patch it, build/test/report/etc.)
What I'm looking for could be done by creating a new directory structure and populating it with hard links from the origonal. However this only works if all the tools you use delete and recreate files rather than edit them in place.
Is there a way to have the file system do copy-on-write for a file?
Note: I'm aware that many FSs use COW at a block level (all updates are done via writes to new blocks) but this is not what I want.
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?