Hierarchical file system
In computing, "a hierarchical file system is one that uses directories to organize files into a tree structure."[1]
If a hierarchical file system, directories contain information about both files and other directories, called subdirectories which, in turn, can point to other subdirectories, and so on.[2] This is organized as a tree structure, or hierarchy, from which it takes its name. A directory called the root directory is the base of the hierarchy, and is usually stored at some fixed location.
A hierarchical file system contrasts with a flat file system, where information about all files is stored in a single directory, and there are no subdirectories.
Almost all file systems today are hierarchical. What is referred to as a file system is a specific instance of a hierarchical system. For example, NTFS, HPFS, and EXT4, all implement a hierarchical system with different features for buffering, file allocation, and file recovery.
Concepts
Path
"A file path describes the location of a file in a web site's folder [directory] structure."[3] That is, it represents the directory nodes visited from the root directory to the file as a list of node names, with the items in the list separated by path separators. The path separator is >
on Multics,[4] /
on Unix-like systems, and \
on MS-DOS 2.0 and later, Windows, and OS/2 systems.
An absolute path begins with a path separator character, which representes the root directory; a path consisting only of a path separator character refers to the root directory.
Working directory
The working directory of a process is a directory dynamically associated with each process. Files are searched relative to the working directory, rather than from the root directory. At logon, the user's working directory is set to their home directory; it can be set afterwards by using a command.
A relative path represents the directory nodes visited from the working directory to the file, rather than from the root directory to the file. A relative path does not begin with a path separator character.
History
![]() | This section needs expansion with: information about Multics, Unix, OpenVMS, the classic Mac OS, etc.. You can help by adding to it. (February 2023) |
Multics
Multics is the first operating system to provide a hierarchical file system.[5][6]
Personal computers
The CP/M operating system used a flat file system, with a directory containing information on a maximum of 64 files—adequate when a floppy disk held only 128&sbsp;KB. PC DOS 1.0 inherited the same structure. PC DOS, which supported hard disk drives introduced a hierarchical file system. The hierarchical file system was used instead of simply expanding the flat directory for performance reasons. "A flat DOS file structure with a single directory and 10 times as many files would logically require 10 times as long to search."[2]
References
- ^ Sharma, Vivek; Varshney, Manish; Sharma, Shantanu (2010). Design and Implementation of Operating System. University Science Press. p. 346. Retrieved February 22, 2023.
- ^ a b Stephens, Mark (June 6, 1988). "Netware, LAN Manager Spar in Network Software Contest". No. Vol 10, issue 23. InfoWorld. Retrieved February 22, 2023.
{{cite news}}
:|issue=
has extra text (help) - ^ "HTML File Paths". W3Schools. Retrieved February 22, 2023.
- ^ "New User's Introduction to Multics - Part I" (PDF). Honeywell Information Systems. November 1979. p. 6-4. CH24-00.
- ^ "Multics Glossary -F-". www.multicians.org. Retrieved April 11, 2018.
- ^ R. C. Daley and P. G. Neumann, "A general-purpose file system for secondary storage", AFIPS '65 (Fall, part I) Proceedings of the November 30 – December 1, 1965