A file in UNIX is nothing but a storehouse of information and everything is treated as a file by UNIX. The files can be broadly classified as follows:
Ordinary files—Contains stream of data. All data, text, source programs, object and executable code, commands fall into this category.
Directory files—Contains no external data. It contains an entry, name of the file and its inode (identification number) for each file and subdirectory under that directory.
Directory files are not created by the user but by the UNIX system itself.
Device files—Even physical devices are treated as files. These are special in the sense that any output directed to it will be reflected onto the respective device.
All files in UNIX are related to one another. The file system of UNIX resembles a tree that grows from top to bottom as shown in the figure. The file system begins with a directory called root (at the top). The root directory is denoted by a slash (\). Branching from root there are several directories such as bin, lib, etc, tmp, dev. Each of these directories contains several sub-directories and files.
No comments:
Post a Comment