In this module, we will discuss:
How UNIX treats regular files and directories differently than other operating systems
The special properties of device files
How to use symbolic links to simplify software maintenance
In addition, we will look at some useful tricks for working with files, including:
Using the options available with the
find command, its predicates, and other utilities to create more targeted finds
The UNIX file system can be characterized with the hierarchical structure
consistent treatment of file data, ability to create and delete files, dynamic growth of files, file data protection, and treatment of peripheral devices (such
as terminals and disk) as files. For users, it is easy to understand the UNIX file system from three aspects: how files in the system are organized, how
files are stored on the secondary storage, and how files are read, and written. The UNIX kernel keeps regular files and directories on block devices such
as disks. The system may have several physical disk units. Partitioning a disk into several parts makes it easier for administrators to manage the data
stored there. Otherwise, the kernel deals on a logical level with file systems rather than with disks, treating each one as a logical device identified by a
logical device number.
Since the UNIX kernel provides its services transparently and hides the device distinction from users, even though a computer system has several disk
drives that contain user and system files, for a user, it is not necessary to worry about which disk drive contains the file that is needed to access.
Users who are familiar with MS-DOS and Microsoft Windows know that there can be several disks or partitions in thses operating systems, such as C:, D:, E.
In UNIX, however, these disks or partitions hide from its users
All the several disk drives or disk partitions can be mounted on the same file system structure, allowing their access as directories and not as named drives C:, D:, E:.
Files and directories on these disks or partitions can be accessed by specifying their pathnames as if they are part of the file system on one single partition of one single disk.
The benefit of this mechanism is for users not to remember in what drive or partition files (and directories) are.