In
computingComputing is usually defined as the activity of using and developing computer technology, computer hardware and software. It is the computer-specific part of information technology...
,
end-of-file, commonly abbreviated
EOF, is a condition in a computer
operating systemAn operating system is an interface between hardware and user which is responsible for the management and coordination of activities and the sharing of the resources of the computer that acts as a host for computing applications run on the machine. As a host, one of the purposes of an operating...
where no more data can be read from a data source. The data source is usually called a file or stream.
In the C Standard Library, file access and other I/O functions may return a value equal to the symbolic value (macro) EOF to indicate that an end-of-file condition has occurred. The actual value of EOF is a system-dependent negative number, commonly -1, which is guaranteed to be unequal to any valid character code.
In
UNIXUnix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
an end-of-file indication can be sent from an interactive shell (
consoleConsole may be:In ' and video games:* System console, a physical device to operate a computer** Virtual console, a user interface for multiple computer consoles on one device** Command-line interface, the typical use of the computer console...
) by typing
Ctrl+DIn telecommunication, an end-of-transmission character is a transmission control character used to indicate the conclusion of a transmission that may have included one or more texts and any associated message headings....
(conventional standard).
In
computingComputing is usually defined as the activity of using and developing computer technology, computer hardware and software. It is the computer-specific part of information technology...
,
end-of-file, commonly abbreviated
EOF, is a condition in a computer
operating systemAn operating system is an interface between hardware and user which is responsible for the management and coordination of activities and the sharing of the resources of the computer that acts as a host for computing applications run on the machine. As a host, one of the purposes of an operating...
where no more data can be read from a data source. The data source is usually called a file or stream.
In the C Standard Library, file access and other I/O functions may return a value equal to the symbolic value (macro) EOF to indicate that an end-of-file condition has occurred. The actual value of EOF is a system-dependent negative number, commonly -1, which is guaranteed to be unequal to any valid character code.
In
UNIXUnix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
an end-of-file indication can be sent from an interactive shell (
consoleConsole may be:In ' and video games:* System console, a physical device to operate a computer** Virtual console, a user interface for multiple computer consoles on one device** Command-line interface, the typical use of the computer console...
) by typing
Ctrl+DIn telecommunication, an end-of-transmission character is a transmission control character used to indicate the conclusion of a transmission that may have included one or more texts and any associated message headings....
(conventional standard). In Microsoft's
DOSDOS, short for "Disk Operating System", is a shorthand term for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions Windows 95, 98, and ME.Related systems...
and
WindowsMicrosoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces...
it is sent by pressing
Ctrl+ZIn computing, control-Z is a control character in ASCII code, also known as the substitute character. It is generated by pressing the key while holding down the key on a computer keyboard....
. In certain cases when dealing with text files or reading data from a "character device", the Microsoft MS-DOS shell (
COMMAND.COMCOMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on 16/32-bit versions of Windows...
) or operating-system utility programs would historically append an
ASCIIThe American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...
control-ZIn computing, control-Z is a control character in ASCII code, also known as the substitute character. It is generated by pressing the key while holding down the key on a computer keyboard....
character to the end of a disk file (though the basic kernel MSDOS.SYS file write calls never appended a control-Z). This was done for backward compatibility with some of the peculiarities of
CP/MCP/M is an operating system originally created for Intel 8080/85 based microcomputers by Gary Kildall of Digital Research, Inc...
, since the CP/M
file systemIn computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them...
only recorded the lengths of files in terms of how many 128-byte "records" were allocated. The
MS-DOS filesystemFile Allocation Table or FAT is a computer file system architecture now widely used on most computer systems and most memory cards, such as those used with digital cameras.It was developed by Bill Gates and Marc McDonald during 1976–1977....
has always recorded the exact byte-length of files from its very first version.
In the ANSI X3.27-1969
magnetic tapeMagnetic tape is a medium for magnetic recording generally consisting of a thin magnetizable coating on a long and narrow strip of plastic. Nearly all recording tape is of this type, whether used for recording audio or video or for computer data storage. It was originally developed in Germany,...
standard, the end of file was indicated by a
tape mark, which consisted of a gap of approximately 3.5 inches of tape followed by a single byte containing the character 13(hex) for nine track tapes and 17 (octal) for
seven track tapesIBM's first magnetic tape data storage devices, introduced in 1952, use what is now generally known as 7 track tape. The magnetic tape is 1/2" wide and there are 6 data tracks plus 1 parity track for a total of 7 parallel tracks that span the length of the tape...
.
http://www.loc.gov/marc/specifications/specexchtape2.html#mark. The
end-of-tape, commonly abbreviated as
EOT, was indicated by two tape marks. This was the standard used, for example, on IBM 360. The reflective strip used to announce impending physical end of tape was also called an
EOT marker.