Hierarchical File System (Apple)
HFS is an acronym for Hierarchical File System.
It is a format specification of a file system for storing files on floppy and hard disks by Apple computers running Mac OS, but can also be found on read-only media such as CD-ROMs.
HFS was designed in the mid 1980s as the native file system for Macintosh computers. It superseded MFS (Macintosh File System) which was a flat file system, used only on the very earliest Mac models. Because Mac computers use richer data than other commonly available file systems, such as FAT, used by DOS and Windows, Apple developed a file system more appropriate for the Macintosh rather than adopting an existing specification. For example, HFS permits filenames up to 31 characters in length, supports metadata and dual forked (separate data and resource forks per file) files.
HFS+ (aka. HFS Extended) is an improved version of HFS, supporting much larger files (64 bit length instead of 32 bit) and using Unicode (instead of Apple's own encoding based on extended ASCII) for naming the items (files, folders). HFS+ permits filenames up to 255 characters in length, and n-forked files, though in the existing APIs, access to only two is available, for backward compatibility with HFS. HFS+ was introduced in the mid 1990s with Mac OS version 8.1, and is the native file format used with Mac OS X. HFS+ also uses a full 32-bit allocation mapping table, rather than HFS's 16 bits. This became a serious limitation of HFS, meaning that any disk could support a maximum of 65,536 sectors under HFS. When disks were small, this was of little consequence, but as they started to approach the 1GB mark, it meant that the smallest amount of space that any file could occupy (a single sector) became excessively large, wasting significant amounts of disk space. For example, on a 1Gb disk, the sector size under HFS is 16KB, so even a 1-byte file would take up 16K of disk space.
Both versions use B-trees to catalogue the filesystem.
In late 2002 Apple added optional journaling features to HFS+ for secured data reliability. These features were accessible in Mac OS X Server, but not the standard desktop client. However, in 2003 Mac OS X version 10.3 set all HFS+ volumes on all Macs to be journaled by default.
While HFS, like most other file systems, may be seen as a proprietary format, many modern operating systems provide software to access HFS formatted disks. See the MacWindows website for solutions. There is also software available for Unix and Linux systems.
Technical information on the HFS formats is available from Apple's Technote 1150.