Computer file

A file (english file) is a component usually in content of related data that is stored on a disk or storage media. These data can thus exist over the duration of a program and also be referred to as persistent - they are not lost when the program terminates.

In the electronic data processing of the contents of each file is initially a one-dimensional string of bits that are interpreted normally summarized in byte blocks. Only the user of a file or an application program or the operating system itself interpret this bit or byte sequence for example as a text, an executable program, an image or a sound recording. So a file has a file format.

Word origin and translation

The word " file" is a portmanteau of data and file, created by the German Institute for Standardization ( DIN).

The German term " file" is significantly narrower than the English translation file, which often includes a (paper) file, a (paper) file or a file box describes. Possibly. need a clarification on datafile or computer file. The Duden allows for a meaning of " file" as a (paper) collection of information, but this use is probably rare.

File Systems

Files are managed in most operating systems, file systems. A file system manages the storage medium by noting in lists which areas of the medium occupied by the files which areas are free, and often reports on planned and / or completed changes.

Although a task of the file system is to abstract from the concrete medium ( " to treat everyone equally " ), but many file systems are adapted to the usual technical characteristics of the storage media (such as block size of 512 bytes for hard drives).

For most file systems 1 byte is the smallest administrative unit, that is, the length of the file content bit stream must rise to whole bytes ( which are also generally allowed = 0 Byte 0 Bit ).

The file system administers directories with file name and location even more file attributes. These type of file ( directory, regular file, special file ), the file size (number of bytes in the file), write, and read permissions, timestamps ( "date", the production, the last access and last modification ) and includes, where applicable other information. A file can be characterized by an attribute as a hidden file.

The usable in filename characters are based on file system, operating system, and optionally Language Options. On Unix - compatible file systems may not slash in a file name ("/" ) and no null characters are, and also the length of the file name is limited to 255 characters. The characters can be coded differently. Newer operating systems also support Unicode.

Types of files

After their content, a distinction among other things:

  • Executables Programs in machine language
  • Programs in scripting languages
  • Programs in an intermediate code ( byte code )
  • Programs in the source code
  • Text files
  • Audio files, such as WAV, MIDI, MP3
  • Image files
  • Database files
  • Link to file
  • General: binaries (eg from proprietary programs used for data storage )
  • ...

Modern file systems also support so-called " sparse files ": Only actually filled with data sections of a ( large ) file is actually stored; the intervening " free areas " are not saved and " filled with zero bytes " as accepted / evaluated.

Some file systems provide also indicate to compress files transparently or encrypt ( "transparent ": The read / edit program can use the file normally, as if the file was not compressed / encrypted - it "sees through this process to pass through unaltered ").

On some operating systems are also

  • Directories
  • Special files (pseudo files) Device files, for example / dev / printer, / dev / mouse
  • Process information, for example / proc/68/environ

Handled as files (especially operating systems of Unix family).

Ways to identify the file format include

  • Be identified by the file system ( for example, a Ausführbarkeits flag)
  • A mark in the file name ( for example. doc file extension at the end of the name)
  • Stored in specific directories (such as / usr / share / doc)
  • A resource fork and other metadata (for example, Mac OS)

Such labeling is partly compulsory, partly it is only for the user orientation. Often missing markings of any kind; for such situations, there are special programs that try to determine the type of a file. In the Unix environment, for example, the command file is it very common.

Symbolic representation

In graphical file managers such as the Finder, Windows Explorer, Nautilus or Dolphin files are typically displayed as a list or icons on a worksheet (windows, folders and others).

199402
de