ArticleslgStudy

science

NTFS links

NTFS links is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand NTFS links rather than just read about it. In short: NTFS links are the abstraction used in the NTFS file system—the default file system for all Microsoft Windows versions belonging to the Windows NT family—to associate pathnames and certain kinds of metadata with entries in the NTFS Master File Table (MFT). NTFS broadly adopts a pattern akin to typical Unix file systems in the way it stores and references file data and metadata.

Key takeaways

  • NTFS links belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect NTFS links to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of NTFS links from memory before moving on to harder problems.

Reference excerpt

NTFS links are the abstraction used in the NTFS file system—the default file system for all Microsoft Windows versions belonging to the Windows NT family—to associate pathnames and certain kinds of metadata with entries in the NTFS Master File Table (MFT). NTFS broadly adopts a pattern akin to typical Unix file systems in the way it stores and references file data and metadata. Entries in the MFT correspond to both inodes (index nodes) and directory entries in a typical Unix file system. In NTFS, an entity in the file system fundamentally exists as a record stored in the MFT of an NTFS volume, the MFT being the core database of the NTFS file system and any attributes and NTFS streams associated with said record. A link in NTFS is itself a record, stored in the MFT, which "points" to another MFT record: the target of the link. Links are the file "entries" in the volume's hierarchical file tree: an NTFS pathname such as\foo.exe or \foobar\baz.txtis a link. If the volume containing said pathnames were mapped toD:in a Windows system, these could be referenced asD:\foo.exeandD:\foobar\baz.txt. (Compare and contrast with typical Unix file systems, where a link is an entry in a directory—directories themselves being just a type of file stored in the file system—pointing either to another link, or to an inode.)

Types of links NTFS supports three types of links: hard links, junctions, and symbolic links.

Hard links Hard links are typical in behavior. A hard link "points" to an MFT record. That target record will be the record for a "regular" file, such as a text file or executable (assuming the NTFS volume is in a normal "healthy" state). Compare with a typical Unix file system, where a hard link points to an inode. As in such file systems, an NTFS hard link cannot point to a directory. A typical new file creation event on an NTFS volume, then, simply involves NTFS allocating and creating one new MFT record, for storing the new file entity's file metadata—including, about any of the data clusters assigned to the file, and the file's data streams; one MFT record for a hard link which points to the first newly-created MFT record as its target; storing a reference to the hard link in a directory file; and setting the reference count of both these MFT records to 1. Any file name provided as part of the file creation event is stored in the hard link. An MFT record can be the target of up to 1024 hard links. Each time a new hard link is successfully created, targeting a previously extant MFT record, the target's reference count is incremented. Symmetrically, the immediate tasks performed by NTFS in a typical file deletion event, when deleting a hard link, are as follows: removing the reference to the link from the directory file containing it (the root directory, if applicable); and decrementing by 1 the reference counts of the MFT record targeted by the link, and, of the entry containing the hard link itself. Any MFT record which now has a refcount of 0 is now in the "deleted" state: all its associated resources are considered "free" by NTFS, to be freely overwritten and used as needed.

Junctions

Junctions are NTFS reparse points and operate similarly to symbolic links in Unix or Linux, but are only defined for directories, and may only be absolute paths on local file systems (as opposed to remote file systems being accessed). They are created and behave in a similar way to hard links, except that if the target directory is renamed, moved, or deleted, the link will no longer be valid.

Symbolic links Symbolic links are reparse points which operate similarly to Junction Points, or symbolic links in Unix or Linux, and accept relative paths and paths to files as well as directories. Support for directory and UNC paths were added in NTFS 3.1. All NTFS links are intended to be transparent to applications. This means that the application accessing a link will be seamlessly redirected by the file system driver, and no special handling is needed. To users, they appear as normal directories or files. This also leads to an aliasing effect: writes to a link will pass the write to the underlying, linked file or MFT entry. Symbolic links contain the path to the linked directory or file, and a tag identifying the driver which implements the behavior. Because they record the path, they can link to files on other volumes or even remote files. However this also means that if the referenced file is deleted or renamed, the link becomes invalid, and if the referenced file or directory is replaced with another, the link will now refer to the new file or directory.

Compared to shortcut files An NTFS symbolic link is not the same as a Windows shortcut file, which is a regular file, usually with the extension .LNK. The latter may be created on any file system (such as the earlier FAT32), may contain metadata (such as an icon to display when the shortcut is viewed in Remove links), and is not transparent to applications. Implementations of Unix-like environments for Windows such as Cygwin and MinGW can use shortcut files to emulate symbolic links where the host operating system does not support them, if configured to do so.

Examples of use

Built-in uses Windows Component Store (WinSxS) use hard links to keep track of different versions of DLLs stored side-by-side on the hard disk drive. Basic installations of Windows Server 2008 used symlinks for \Users\All Users\ → \ProgramData\ redirection. Since Windows Vista, all versions of Windows have used a specific scheme of built-in directories and utilize hidden junctions to maintain backward compatibility with Windows XP and older. Examples of these junctions are: C:\Documents and Settings pointing to C:\Users %USERPROFILE%\Application Data pointing to %USERPROFILE%\AppData\Roaming %USERPROFILE%\My Documents\My Pictures pointing to %USERPROFILE%\Pictures

Program redirection By setting a junction point that points to a directory containing a particular version of a piece of software, it may be possible to add another version of the software and redirect the junction point to point to the version desired.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with NTFS links

Start with the simplest possible case. Write down what NTFS links claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to NTFS links before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about NTFS links ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of NTFS links

In research
NTFS links appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses NTFS links in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
NTFS links is common in secondary-school and first-year university syllabi. It links to neighbouring topics Disk file systems, Windows administration, Windows commands, so understanding it makes those chapters shorter.
In everyday life
Look for NTFS links outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “NTFS links” →

How to study NTFS links in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what NTFS links means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain NTFS links out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is NTFS links in simple terms?

NTFS links are the abstraction used in the NTFS file system—the default file system for all Microsoft Windows versions belonging to the Windows NT family—to associate pathnames and certain kinds of metadata with entries in the NTFS Master File Table (MFT). NTFS broadly adopts a pattern akin to typi…

Why does NTFS links matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study NTFS links?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on NTFS links.

Tags

  • Disk file systems
  • Windows administration
  • Windows commands
  • Windows disk file systems

Keep exploring