How do I delete hardlinks, symbolic links, junction points, etc please?

10,422

You cannot remove/disable/or inhibit the functionality of links in NTFS. It's a feature of the base file-system. I am a bit curious as to why you're wanting to disable them. Symbolic & Hard links both have been used for decades in varying forms. As far as exploitability goes... if a virus/hacker/??? can get access to the file system with sufficient privileges to create/delete them... you have far more things to worry about.

Share:
10,422

Related videos on Youtube

jonny
Author by

jonny

Updated on September 18, 2022

Comments

  • jonny
    jonny over 1 year

    I could be wrong, but I'm yet to hear a valid argument for the exploitability that these things deliver...outweighing their very dubious / debatable functionality. They seem to me to be marginally handy, but I don't think I have any need for them. I do have a need for security, however.

    How can I delete their entire functionality permanently from my hard drive, please? Microsoft only has pages on how to create them; which seems almost peculiar to the point of being dubious (at least, to me...)


    And just a dumb command line question, am I correct in assuming fsutil hardlink list c: will enumerate every single hardlink on that drive?

    C:\Windows\system32>fsutil hardlink list c:
    \Windows\System32
    

    Also, how do I delete symbolic links please ;)

    But I'd just rather have all symbolic linking and recursion-creating stuff removed, if that's possible?

    C:\Windows\system32>fsutil behavior query symlinkevaluation
    Local to local symbolic links are enabled.
    Local to remote symbolic links are enabled.
    Remote to local symbolic links are disabled.
    Remote to remote symbolic links are disabled.
    
  • TheCompWiz
    TheCompWiz about 13 years
    What does that have to do with symlinks? A self-replicating virus is a virus that replicates itself... symbolic links only provide multiple "mount-points" to the same directories/files.
  • jonny
    jonny about 13 years
    I mean, it just seems like unnecessary hassle, no genuine benefit for me; but hassle at BEST, danger at worst. Simple risk/reward says locking the functionality in makes no sense> I'm having trouble accepting the answer actually, and I'll explain why: What would be the point of the output quoted in my question, if your answer is correct? Something that is enabled should be able to be disabled, it stands to reason.
  • jonny
    jonny about 13 years
    A mountpoint on your computer to my computer is very different from a file replicating itself on my computer, is it not?
  • TheCompWiz
    TheCompWiz about 13 years
    The simplest reason to use symbolic links is so that you don't need 50 copies of the same files in 50 places. Create the files one time, and allow everything to use them where they expect to find them. In a practical example... "C:\Documents and Settings" in windows 7 is a symbolic link to "C:\Users"... simply to offer backwards compatibility with older applications that would look in the wrong place for files.
  • TheCompWiz
    TheCompWiz about 13 years
    But if you are able to access my computer... than theoretically, the virus could also access my computer. No amount of removing a symbolic link would save you.
  • jonny
    jonny about 13 years
    I admit I'm a bit confused. But thanks for answering. Do you get my point about the enabled / disabled output? What would be the very FUNCTION of query symlink if the settings were universally locked in NTFS?
  • TheCompWiz
    TheCompWiz about 13 years
    You can enable/disable them as you will... but that only enables/disables the creation of new symlinks... it will not affect the behavior of existing ones. (if I understand technet correctly)