[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] Skip to the content of the web site.

File Types

Contents Previous Topic Next Topic

A file system is divided into two different structures: the first, a file, is used for storing, accessing, and manipulating information while the second, a directory, is used for organizing information in a logical manner. (In Unix, directories are stored as files, as well.)

Directories

A directory is a structure which contains files and other directories. In practice, the files and directories within a directory should, in some way, be related. The relationship between a directory contained within another directory is described by calling it a sub-directory.

For example, on ecelinux, the directory /home (read slash home) contains the home directories of all users with accounts on that computer. The directory /home/dwharder contains all the files and directories owned by user dwharder. One of the directories may be ece250 which may contains five subdirectories p1, p2, p3, p4, and p5.

When you access a directory through a shell, the shell communicates with a File Manager, a process which is dedicated to maintaining and allowing access to the files stored on a system.

Files

Files may be broken down into one of two categories: data and executable files (though the second could be thought of as a data file containing instructions for the processor).

An executable file may be run as a command at a shell. For example, when you type date (as shown in Figure 1), the shell executes the executable file /usr/local/bin/date. The format of the instructions (machine language) is covered in ECE 222.

Data files can be subdivided into two different broad categories:

ASCII data files generally use only printable characters and are therefore editable in a text editor. Binary files must, in general, be interpreted by specific programs. An executable program is also a binary file, being interpreted by the processor.

Note: For those who may have written perl scripts, or used some other scripting language, the file itself is not executable. Instead, the operating system runs the executable specified after the #! (read sha-bang). If you're interested, you can read the topic on executable scripts.

Contents Previous Topic Next Topic

Copyright ©2005-2008 by Douglas Wilhelm Harder. All rights reserved.

[an error occurred while processing this directive]