ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

soft and hard links in ntfs

(1/7) > >>

nudone:
i found a link on shellextension city for this little app, 'NTFS Links' http://alax.info/blog/ntfslinks

can someone just explain why i'd want a hard or soft link and not just a shortcut?

i'm not trying to say hard and soft links are a waste of time - i just feel like i'm missing out on something that could be useful but i can't understand their purpose.

thanks.

Gothi[c]:
You can't "cd" to a shortcut, for example.
You can't "type" a shortcut in commandprompt and get your original file, for example.
Shortcut generally only work with thingies you click on.

nudone:
right, so as i don't ever use the command prompt (unless i really have to) i've no real use for hard/soft links.

thanks for putting my mind at rest, Gothi[c]

jgpaiva:
I'm not sure about this, please correct me if i'm wrong.
I belive a hard link also allows you to have a a better organization, I mean, you can have like the root of D:\ with files from the whole filesystem.
It'd make it easier to install stuff, as to install something in a deep place, you could only have a hard like like "d:\place", and you wouldn't have to be browsing for it, as it would be resolved if you'd just type in "d:\place" in the destination box.

Gothic if i'm wrong, please correct me, as i haven't tried hard links myself, because i didn't give myself the work. (but if i'm right, i might rethink this ;))

db90h:
Yep, they can be used for better organization, or anything else. Without 'hard links', my life would have ended long ago. I'd still be typing long path names, navigating to deep folders, or changing hard coded path configurations right this minute if it weren't for hard links!

Hard links are technically NTFS reparse points.You could think of them as a pointer to (or alias for) another filesystem object, but really they are true alternate mount points for those filesystem objects.

Volumes can be mounted to a folder, like "c:\dev" holds my D: drive. This is a mount type reparse point.
Folders and files can be linked, like "c:\downloads" may reference "f:\this\folder\holds\downloads". This is a junction type reparse point.
Files can be linked in much the same way. This is a junction type reparse point.

Without a program like NTFSLink, if I were to delete c:\downloads in explorer, it would delete f:\this\folder\holds\downloads as well. NTFSLink intercepts deletion operations so that you won't accidentally delete the 'backing' files when you just want to remove a link. This is the #1 problem with reparse points. A soft link, like a shortcut, however can be deleted without deleting the backing folder.

So the way the file system treats the types of links is fundamentally different, particularly in delete, rename, and other operations. A normal file system operation on a soft link (shortcut) acts only on itself, while a hard link acts on the target.

NTFSLink is a great program to adds safe and effective support for junction type reparse points (mount type reparse points are already supported in disk manager). I actually went to code a program to create NTFS reparse junctions (SHJunction I called it), but stopped development when I found NTFSLink. I did release an early version of it, then killed myself when I discovered NTFSLink.

Navigation

[0] Message Index

[#] Next page

Go to full version