Definition of a file

Definition of a file

A file is an unstructured sequence of characters stored in a file.

There are two possibilities to read (to access to) a file:

  • sequential access (one reads the characters one after the other)

  • or direct access (one accesses the character at a given address).

Under Unix, everything is file (or almost). A file can contain characters, but also binary (machine) code. However, the system makes a difference on the kinds of files it handles. He thus knows:

  • Ordinary files (files) used to store programs or data

  • Directories that allow you to group files

  • Character files (characters) as a keyboard input

  • Block access files (blocks) as a hard disk

  • Files that contain references to another volume and are called symbolic links (links)

  • Pipes (pipes) that connect two processes, for example by connecting the standard output of one process to the standard input of another

  • Files that allow access to remote files on a network (socket)