What is a file?



Last revision August 3, 2004

Table of Contents:
  1. The Unix file system
  2. The directory tree
  3. File ownership and permissions
  4. Files as units
  5. Examining file contents
  6. Other commands
  7. Standard Files and Data Pipes

A file includes:

Data contents - stream of bytes - stored somewhere on the disk.

Administrative data called an "inode" which uniquely identifies where the data is stored and what its characteristics are (owner, date, etc); but the name of the file is not stored as part of the inode. Important data stored in the inode includes:

The name is not stored as part of the file. No file knows its own name. The name is simply a reference (or link) to an inode. This name is stored in a special file called a directory.

There is no concept of file type or file creator stored with the file. Programs interpret the contents of the file as they desire and any program can access any file. When using file shares on a Unix server to store Windows PC or Macintosh files, the filename extension (such as .doc or .xls) is retained as part of the filename on the Unix server, but it has no special meaning to Unix programs. It only has meaning to the PC or Macintosh that accesses the file.

<--Previous Overview Next-->