TEXT   44

all about symbolic links in windows

Guest on 23rd August 2022 03:57:01 AM

  1. Windows has the following types of link-like structures available on NTFS:
  3. (copied from
  4. http://superuser.com/questions/347930/what-are-the-various-link-types-in-windows-how-do-i-create-them)
  6.         Shortcut links: Use them when you need quick access to an executable or
  7.         website, a file that you launch very often or when you need to specify
  8.         parameters to an application and a batch file is an overkill. Don't use it
  9.         when you intend to manipulate the file through its shortcut.
  11.         Junction points: Use them when you want a directory to be elsewhere, this
  12.         allows you to move directories to faster or slower drives without losing the
  13.         ability to access the original path. Another use is when you want access to a
  14.         directory through another path. These can't be used to link to a share.
  16.         Soft links: Use them where a shortcut link does not suffice, it is often used
  17.         when you do intend to manipulate the file through its shortcut. Or when you
  18.         want the file to be on a faster or slower drive without losing the ability to
  19.         access the original path.
  21.         Hard links: Use them when you only want a file to be gone when all hard links
  22.         to it are removed. This can't be used for folders.
  24.         Volume mount points: Use them when you run out of drive letters, or when you
  25.         find it more feasible to access a volume through a path rather than through a
  26.         drive letter.
  28.         Libraries: Use them when you have the same type of file at many different
  29.         locations and you need them to be together, this supports removable drives so
  30.         makes it handy to get the folders on your removable drives show up between
  31.         those on your computer when you insert it. You can click on the individual
  32.         folders from the folder tree under the library in the tree view, which
  33.         facilitates moving files between both.
  35.         UNKNOWN MICROSOFT REPARSE POINT: This is a special, relatively
  36.         undocumented/unsupported kind of symlink found only in Windows Home
  37.         Server. It is used by the DiskExtender subsystem. At time of writing,
  38.         there are no known utilities for dealing with these, and they are not
  39.         easily visible in "dir" (they show up in "dir /AL" but look like normal
  40.         files in "dir"). These are indistinguishable from normal files in
  41.         Explorer, except when they stop working because their target has moved,
  42.         which will manifest as a mysterious "access denied" "permission denied" or
  43.         "cannot read file" error that seems unrelated to security permissions.
  45. You can create some of the types of links with the mklink (see mklink /? --
  46. note: mklink is a cmd.exe built-in, so it is not available from powershell or
  47. any other interface besides cmd.exe) command. Some types of links will show up
  48. in the output of "dir", some won't.
  50. Note: the order of the arguments to mklink is "<link name> <target name>" --
  51. this is backwards from the ln command under unix. Be careful!
  53. You can find out if something is a link with the dir command:
  54. dir /AL
  56. You can list all the things that are links, recursively:
  57. dir /AL /S C:\
  59. There are a couple of third-party tools that can show link targets:
  61. Command line: http://technet.microsoft.com/en-us/sysinternals/bb896768
  62. GUI: http://www.nirsoft.net/utils/ntfs_links_view.html

Raw Paste

Login or Register to edit or fork this paste. It's free.