Download presentation
Presentation is loading. Please wait.
Published byEunice Farmer Modified over 9 years ago
1
Chapter 2 (Cont.) The Unix Way Essential System Administration, 3rd Edition
2
2 Unix organizes all user-accessible files into a single hierarchical directory structure. On most Unix systems, disks are divided into one or more fixed- size partitions. The disk partition containing the root filesystem is called the root partition and sometimes the root disk. The root filesystem is the first one mounted, early in the Unix boot process. The remaining ones are mounted afterwards. 2.3.1 An In-Depth Device Example: Disks
3
3 On many operating systems, mounting is making the device's contents available. For Unix, it means mapping pathnames to the correct physical device and data blocks. Disk partitions may be accessed in two modes: Block mode and Raw (or character) mode. Different special files are used from each mode. 2.3.1 Disks (Cont.)
4
Hardware devices can generally be categorized into: Random access devices/Block Devices (like disk and tape drives) Serial devices like/Character Devices (mouse devices, sound cards, and terminals) Random access devices are usually accessed in large contiguous blocks of data that are stored persistently. brw-r----- 1 root disk 3,64 Apr 27 1995 /dev/hdb b on the far left of the listing, means that your hard disk is a block device. 4 2.3.1 Disks (Cont.)
5
5 Serial devices, on the other hand, are accessed one byte at a time. Data can be read or written only once. For example, after a byte has been read from your mouse, the same byte cannot be read by some other program. crw-r--r-- 1 root sys 14, 3 Jul 18 1994 /dev/dsp C on the far left of the listing, means that your hard disk is a Character device. 2.3.1 Disks (Cont.)
6
As an example of the use of special files to access disk partitions, consider the mount commands below: # mount /dev/disk0a / # mount /dev/disk1e /home The command to mount a disk partition needs to specify the physical disk partition to be mounted (mount's first argument) and the location to place it in the filesystem. The mount command is discussed in greater detail in Chapter 10. 6 2.3.1 Disks (Cont.)
7
7 Other device types have special files named differently, but they follow the same basic conventions. Some of the most common are summarized in Table 2-9: 2.3.2 Special Files for Other Devices
8
8
9
9 Most Unix versions provide commands that make it easy to quickly determine what devices are present on the system, as well as their current status. The following Table (Table 2-10) lists the commands for the different systems: 2.3.2.1 Commands for listing the devices on a system
10
10
11
11 2.3.3 The Unix Filesystem Layout
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.