File - File


A file is a logical representation of multiple block that can be accessed and manipulated at once by a program.

A file is durable in the sense that it remains available for programs to use after the current program has finished.

A file is also known;


There are three types of files:

  • Regular - Stores data (text, binary, and executable).
  • Directory - Contains information used to access other files.
  • Special - Defines a FIFO (first-in, first-out) file or a physical device. (Network) -


File System attributes

A file has three important attributes:

A file consists also of attributes such as:

Example of properties from the Linux stat utility

  File: `testFile.txt'
  Size: 4               Blocks: 8          IO Block: 4096   regular file
Device: ca02h/51714d    Inode: 2522975     Links: 1
Access: (0644/-rw-r--r--)  Uid: (  500/  oracle)   Gid: ( 1001/oinstall)
Access: 2015-09-15 13:50:26.000000000 +0200
Modify: 2015-09-15 12:43:18.000000000 +0200
Change: 2015-09-15 12:43:18.000000000 +0200


List of open files: see IO - Diagnostic/Monitoring

File handles (open file) are scarce, finite resources. Because they are loaded in memory, the maximum number of open file is always a parameter of the file system (Generally in the OS). You can them run out of them if you don't close in your application the stream (ie the in-memory file representation of a file) up properly, just like database connections.





The location of a file is given:

  • logically by its path but there is also other structure such as an Inode
  • that the file system physically translate to an address on the file store



All data on a computer are stored and manipulated as bit.

When talking about a binary file, it generally means that is not textual data but in another format. See Bit - Binary Data (Structure)

Documentation / Reference

Powered by ComboStrap