
In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, a hierarchical file system is a
file system that uses
directories to organize files into a tree structure.
In 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.
This is organized as a
tree structure
A tree structure, tree diagram, or tree model is a way of representing the hierarchical nature of a structure in a graphical form. It is named a "tree structure" because the classic representation resembles a tree, although the chart is gen ...
, or ''hierarchy'', generally portrayed with the root at the top. The ''root directory'' is the base of the hierarchy, and is usually stored at some fixed location on disk.
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
NT File System (NTFS) (commonly called ''New Technology File System'') is a proprietary journaling file system developed by Microsoft in the 1990s.
It was developed to overcome scalability, security and other limitations with File Allocation Tabl ...
,
HPFS, and
ext4, all implement a hierarchical system with different features for
buffering, file allocation, and
file recovery.
Concepts
Path
A
file path is a string of characters that contains the location of a file in a computer's file structure. 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
Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
,
/
on
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems, and
\
on
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
2.0 and later,
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and
OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
systems.
An ''absolute path'' begins at the root directory; that is, begins with a path separator character, which, at the beginning of a path, represents the root directory. A path consisting only of a path separator character refers to the root directory.
Working directory
The
working directory
In computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with the process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just c ...
of a
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
* Business process, activities that produce a specific s ...
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
A home directory is a directory (file systems), file system directory on a multi-user operating system containing computer file, files for a given user (computing), user of the system. The specifics of the home directory (such as its name and loc ...
; 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
Multics
Multics
Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
is the first operating system to provide a hierarchical file system. File names can be any length or format, multiple names for a particular file or directory, and symbolic connections between the directories ( symlinks) are one of the many other features Multics introduced with its hierarchical file system.
IBM OS/360
OS/360 has had a hierarchical system since its earliest days.
The ''system catalog'' is layered on top of a flat file system, where a disk file's "directory entry" is stored in each volume's '' Volume Table of Contents'' (VTOC), and files can be referenced either thru the catalog or by specifying the volume serial number directly. Specifying a dataset name without specifying a serial number in JCL implies a catalog search. The catalog stores only a pointer to the volume.
The OS/360 catalog has a number of differences from other hierarchical file systems. The "root directory", a dataset named SYSCTLG
, may contain file pointers or links to subdirectories called CVOLS
.[ The path separator is ].
. All paths are absolute paths, a leading .
is always assumed and cannot be coded. Path components (between .
) are limited to eight characters. The catalog is not restricted to disk ('' DASD'') files, but can also catalog magnetic tape
Magnetic tape is a medium for magnetic storage made of a thin, magnetizable coating on a long, narrow strip of plastic film. It was developed in Germany in 1928, based on the earlier magnetic wire recording from Denmark. Devices that use magnetic ...
datasets. Not all volumes indicated in the catalog have to be online, and the system allows disk and tape volumes to be mounted on request following a catalog search.
Unlike most other systems, it is possible to create a file without cataloging it. Cataloging is requested thru JCL or a utility program.
A cataloged dataset name might look like PAYROLL.WEEKLY.HOURS
.
IBM virtual storage operating systems replaced SYSCTLG
with a ''VSAM Catalog''. Cataloging is mandatory for VSAM datasets, but, as before, non-VSAM datasets may be cataloged or not cataloged. The program "Access Method Services" (IDCAMS) maintains the VSAM Catalog.
Personal computers
DOS and Windows
The CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
operating system uses a flat file system, with a directory containing information on a maximum of 64 files—adequate when a floppy disk held only 128 KB. IBM PC DOS and MS-DOS 1.0 inherited the same structure. DOS 2.0, which supported hard disk drive
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
s, 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."[ ]OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
and Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
also support a hierarchical file system, using the same path syntax as DOS.
Classic Mac OS
All versions of Classic Mac OS
Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Mac (computer), Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and end ...
before System 2.1 used a flat file system, the Macintosh File System, which maintained all the files in a single list, however Finder provided the illusion of folders with records maintained in the Desktop file. From System 2.1 onwards, the Macintosh File System was superseded by the Hierarchical File System which allowed for multiple layers of folders and files.
See also
* Filesystem Hierarchy Standard
The Filesystem Hierarchy Standard (FHS) is a reference describing the conventions used for the layout of Unix-like systems. It has been made popular by its use in Linux distributions, but it is used by other Unix-like systems as well. It is main ...
References
{{Reflist
Computer file systems
Operating system technology
Hard disk software