Advertisement

Computer file

From Academic Kids

A file in a computer system is a stream (sequence) of bits stored as a single unit, typically in a file system on disk or magnetic tape.

While a file is usually presented as a single stream, it most often is stored as multiple fragments of data at different places on a disk (or even multiple disks). One of the services operating systems usually perform for applications is that of organization of files in a file system.

Files are created by software and usually conform to a particular file format. They are almost always assigned file names by the file system on which they are stored, so that they can be referred to at a later time.

Some operating systems allow the contents of a file to be segmented into fixed and variable length records. For example, OpenVMS allows any arbitrary set of characters to be defined as the terminators to variable length record within a file. Others, like Microsoft Windows, have only one specialised subclass of file, called a text file, where a sequence of characters separate the data into lines of text (a specialised variable length record). Some operating systems, such as UNIX, do not have ability to handle file records at the operating system level, instead it is done at the application level. See record-oriented filesystem.

A special file is a file system object which is accessed as though it was a file, but the sequence of bits is supplied or consumed by another process (or by the operating system itself) such as a device driver or network interface. Indeed, the philosophy that "everything is a file" is one of the best known design decisions in Unix and Unix-like operating systems (such as Linux).

Files are often organized hierarchically by the operating system, placing them in directories.

Notes

  1. A collection of bytes in RAM isn't usually known as a file, unless it's stored in a RAM disk.
  2. Historically it was common for files to be defined as sequences of records. However this is now uncommon except on certain mainframe operating systems. On most systems, the application or a library creates the "record" abstraction from the byte stream according to the file format.
  3. Some operating systems use an extension (or "suffix", although the extension does not have to be placed at the end of the filename -- some systems may place it before the filename, for example) to differentiate between files whose contents or data are organized in different formats. The operating system, as well as the underlying file system, may impose restrictions on the length of file extensions. For example, MS DOS limits file extensions to three characters or less. Examples of common file extensions on MS-DOS systems include .EXE for executable programs, .TXT for plain text files, and .ZIP for archives encoded and usually compressed using methods compatible with PKWARE's PKZIP archiver product. File extensions are commonly used to simplify file management tasks for users. For example, suppose you have a directory containing files of different media formats. Some are still images, some are animations, and some are digitally sampled audio waveforms. If you know that all the samples have an extension of .PCM, you could easily issue a copy command to copy all these files to a different directory, whether it be within the same file system or on a separate physical disk. Many application software programs use the presence of a header in the file formats with which they work to determine the actual type of a given file. For example, an executable program on DOS may have an extension of .COM even though the .COM extension is usually reserved for a different, more simple executable format. DOS knows that the file is an executable because of the presence of some signature bytes at the start of the file. 'Unix like' operating systems do not have any fixed extension for files, although .tar, .gz, .sh, and others are standard (see also magic numbers). In many cases, standardised file extensions are useful because they make it easier for users of different computer systems and operating systems to share files, since the format of a file's content is more clear.

See also

External links

da:Fil de:Datei es:Archivo informtico fr:Fichier fy:Triem nl:Bestand (computer) pl:Plik pt:Arquivo ru:Компьютерный файл sl:Datoteka zh:计算机文件

Navigation

Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools