Computer file
A named collection of data managed as a unit.
Last updated
A computer file is a named bundle of data that the system managing it treats as a single unit; that system is called a file system today. Older computers often lacked a separate file system, but some management feature was always needed to provide the file abstraction. Files can be passed between computers and mobile devices using removable media, networks, or the Internet. Different kinds of computer files serve different purposes: a file might hold a written message, a document, a spreadsheet, an image, a video, a program, or many other types of data.
Some files can store several data types at once. Using computer programs, a person can open, read, change, save, and close a file. Files may be reopened, modified, and copied any number of times.
Etymology
The word "file" comes from the Latin filum, meaning "a thread, string." In English, "file" later came to refer to various systems for arranging papers and documents for retrieval. "File" was used in computer storage as early as January 1940, when W. J. Eckert wrote about using punched cards to build tables "either as printed tables or as a file of punched cards." In February 1950, an RCA advertisement described a new memory vacuum tube that could keep results "on file" and retrieve them. By 1952, "file" denoted information stored on punched cards. In early computing, "file" could refer to the hardware itself, such as IBM 350 disk drives called "disk files." The modern meaning of "file" as a virtual entity managed by a "file system" began around 1961 with the Burroughs MCP and MIT's Compatible Time-Sharing System. The term "register file" shows an earlier concept, but its use has greatly declined.
File system
A file system provides the file abstraction to software, letting it organize, name, and manipulate data as files. Early computers lacked a distinct file system, but the function was often provided directly by the core operating system. Modern systems may use multiple file systems: Unix-like systems typically allow several, and some Windows systems support both older FAT-type file systems and the normal NTFS.
File manager
A file manager is a utility that lets a user directly manipulate files—typically moving, creating, deleting, and renaming files and directories (also called folders), though it may not show file content. Most computer systems have at least one file manager for their native file system, such as File Explorer on Windows or Nautilus on several Linux distributions.
File contents
On most modern operating systems, files are organized as one-dimensional arrays of bytes. A file's format is defined by its content, since a file is just a container for data. On some platforms, the format is indicated by a filename extension, which specifies how the bytes must be organized and interpreted. For example, the bytes of a plain text file (.txt on Windows) are associated with ASCII or UTF-8 characters, while image, video, and audio files are interpreted differently.
Most file types also set aside a few bytes for metadata, letting a file carry basic information about itself. Some file systems can store arbitrary file-specific data outside the file format but linked to the file, such as extended attributes or forks. On other file systems, this is done with sidecar files or software-specific databases. All these methods are more prone to losing metadata than container and archive file formats.
File size measures the storage space allocated to the file. It is often expressed in bytes, but many older file systems tracked size in larger units like blocks or tracks. Sometimes a more precise measure was available; for example, CP/M marked the end of a text file with Ctrl-Z, which could give a size with byte precision. Typically, a file system limits the maximum file size due to its design.
Information in a file can consist of smaller packets, often called records or lines, that differ individually but share common traits. For instance, a payroll file might contain details about every employee in a company, with each record concerning one employee and all records related to payroll—much like placing all payroll information into a specific filing cabinet in an office without a computer. A text file may contain lines of text, corresponding to printed lines on paper.
Quick Facts
- Etymology
- From Latin filum ('a thread, string')
- First use in computing
- January 1940
- Early reference
- Punched Card Methods in Scientific Computation by W. J. Eckert
Facts from the source article.
Lore & Background
A computer file is an abstract container for data, treated as a single unit by a file system. Early computers lacked a distinct file system, but the management feature providing this abstraction was always necessary. Files can be shared between computers via removable media, networks, or the internet. They are designed for many purposes, including storing text, documents, spreadsheets, images, videos, programs, or other data types; some files can hold multiple data types at once.
Using a program, a user can open, read, change, save, and close a file, and files may be reopened, modified, or copied any number of times. On most modern systems, a file is organized as a one-dimensional array of bytes. Its format is defined by its content, though on some platforms the filename extension indicates how the bytes should be interpreted—for example, plain text bytes are associated with ASCII or UTF-8 characters, while image, video, or audio bytes follow different rules. Many file types allocate a few bytes for metadata.
Some file systems can store arbitrary file-specific data outside the file format, such as extended attributes or forks, while others use sidecar files or databases, though these methods are more prone to metadata loss than container formats. File size measures allocated storage, often in bytes, though older systems used blocks or tracks; CP/M marked text file ends with Ctrl-Z for byte-precise size. File systems typically impose a maximum file size. Information within a file can be organized into smaller packets, like records or lines, that share common traits—similar to placing all payroll information into a specific filing cabinet.
Reader's Guide
The concept of a computer file is fundamental to modern computing, providing a way to organize, name, and manipulate data as a unit. Early computers lacked a distinct file system, but the function was required and often provided directly by the core operating system. Today, file systems enable software to organize data as files, and most modern operating systems include at least one file manager program for their native file system.
Files are organized into one-dimensional arrays of bytes, with format often indicated by filename extension. The most basic operations on a file include creating, opening, reading, writing, deleting, and closing. In Unix-like systems, user-space programs interact with files through filenames, with the kernel handling low-level operations transparently.
Frequently Asked Questions
Where does the word 'file' in computing come from?
The term traces back to the Latin word 'filum,' meaning a thread or string. In computing it first appeared in print in January 1940 in W. J. Eckert's work 'Punched Card Methods in Scientific Computation.'
What kinds of data can a computer file contain?
Files are designed to store a wide range of content, including text documents, images, video, audio, and executable program code. Each file type is structured so the operating system and applications know how to read and process it.
How can a computer file be moved from one device to another?
Files can be transferred between computers and mobile devices through removable media like USB drives, over local networks, or across the Internet. This makes sharing and backing up data straightforward regardless of the platforms involved.
More in Computing & Digital
Sources
Compiled from Wikipedia and the sources listed below. Text from Wikipedia is available under CC BY-SA 4.0; this entry is adapted from it.
- Wikipedia: Computer file (CC BY-SA 4.0).
Spotted an error? Know more?
Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced
