Concept

Hard link

Summary
In computing, a hard link is a directory entry (in a directory-based ) that associates a name with a . Thus, each file must have at least one hard link. Creating additional hard links for a file makes the contents of that file accessible via additional paths (i.e., via different names or in different directories). This causes an alias effect: a process can open the file by any one of its paths and change its content. By contrast, a soft link or to a file is not a direct link to the data itself, but rather a reference to a hard link or another soft link. Every directory is itself a special file, only it contains a list of file names. Hence, multiple hard links to directories are possible, which could create a circular directory structure, rather than a branching structure like a tree. For that reason, some file systems forbid the creation of hard links to directories. POSIX-compliant operating systems, such as Linux, Android, macOS, and the Windows NT family, support multiple hard links to the same file, depending on the file system. For instance, NTFS and ReFS support hard links, while does not. Let two hard links, named "LINK A.TXT" and "LINK B.TXT", point to the same physical data. A text editor opens "LINK A.TXT", modifies it and saves it. When the editor (or any other app) opens "LINK B.TXT", it can see those changes made to "LINK A.TXT", since both file names point to the same data. So from a user's point of view this is one file with several filenames. Editing any filename modifies "all" files, however deleting "any" filename except the last one keeps the file around. However, some editors, such as GNU Emacs, break the hard link concept. When opening a file for editing, e.g., "LINK B.TXT", emacs renames "LINK B.TXT" to "LINK B.TXT~", loads "LINK B.TXT~" into the editor, and saves the modified contents to a newly created "LINK B.TXT". Now, "LINK A.TXT" and "LINK B.TXT" no longer shares the same data. (This behavior can be changed using the emacs variable backup-by-copying.) Any number of hard links to the physical data may be created.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related courses (1)
HUM-369: Digital humanities
Les Digital Humanities sont une discipline à la croisée des sciences de l'information et des sciences humaines et sociales. Dans ce cours, les étudiantes et étudiants découvrent ce nouveau domaine de
Related lectures (31)
File Systems
Covers the fundamentals of file systems, focusing on managing persistent blocks efficiently and implementing file system APIs.
Input/Output: Basics & Files
Introduces input/output operations in C++, including file handling and data formatting.
Input/Output: Basics
Covers the basics of input/output operations in C++, including interacting with the world through keyboard and screen.
Show more
Related publications (6)

Health data privacy through homomorphic encryption and distributed ledger computing: an ethical-legal qualitative expert assessment study

Marcello Ienca

Background: Increasingly, hospitals and research institutes are developing technical solutions for sharing patient data in a privacy preserving manner. Two of these technical solutions are homomorphic encryption and distributed ledger technology. Homomorph ...
BMC2022

Pyramic array: An FPGA based platform for multi-channel audio acquisition

Juan Azcarreta Ortiz

Microphone arrays techniques present compelling applications for robotic applications. Those techniques can allow robots to listen to their environment and infer clues from it. Such features might enable capabilities such as natural interaction with humans ...
2016

Analysing the distribution of walking in the Swiss population

Vincent Kaufmann, Emmanuel Pierre Jean Ravalet, Derek Pierre Christie

In many countries including Switzerland, public policy encourages people to walk for reasons linked to health, the environment, and transport. However, the distribution of walking in the population is not known. People who walk great distances have not bee ...
2015
Show more
Related concepts (16)
File system
In computing, a file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one large body of data with no way to tell where one piece of data stopped and the next began, or where any piece of data was located when it was time to retrieve it. By separating the data into pieces and giving each piece a name, the data are easily isolated and identified.
Symbolic link
In computing, a symbolic link (also symlink or soft link) is a file whose purpose is to point to a file or directory (called the "target") by specifying a path thereto. Symbolic links are supported by POSIX and by most Unix-like operating systems, such as FreeBSD, Linux, and macOS. Limited support also exists in Windows 7 and Windows Vista, and to some degree in Windows 2000 and Windows XP in the form of shortcut files. on IBM 7090 had files linked by name in 1963.
Inode
The inode (index node) is a data structure in a that describes a object such as a or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and data. A directory is a list of inodes with their assigned names. The list includes an entry for itself, its parent, and each of its children. There has been uncertainty on the Linux kernel mailing list about the reason for the "i" in "inode".
Show more