The Linux File System
◾
439
Linux directories and files of note discussed in this chapter:
• aquota.user—the database of users/groups of a file system generated by the quotacheck
instruction, stored at the root level of the given file system (e.g., /home/aquota.user).
• /bin—location of common binary files (Linux commands and programs).
• /boot—location of boot loader program (e.g., GRUB) and Linux kernel,
required for
booting Linux.
• /dev—directory storing interfaces to most of the available devices (both physical like
hard disk, optical disk, modem and logical like terminal windows (tty), programs like
random and zero, and ramdisks).
• /etc—stores
system configuration files; system administrators will often use the files
in this directory.
• /etc/mtab—the currently mounted partitions; kept up-to-date.
• /etc/fstab—the file system table, specifies mount operations at system initialization
time.
• /home—the users’ home directory space.
• /proc—stored in memory
rather than on the file system, this directory stores infor-
mation about all running processes.
• /root—the system administrator’s home directory.
• /sbin—system administration binary files (commands, programs).
• /usr—application software and other common programs that are not found under /bin
and /sbin.
• /var—system data files that grow over time such as log files, email files, and print
spooler files.
REVIEW PROBLEMS
1. What is the difference between how early Windows and Linux index disk blocks?
2. What is the most recent version of the extended file system as used in Linux?
3. Which of the following file systems can Linux utilize: NFS, FAT, NTFS, Files-11?
4. What is a B
+
tree (you might have to research this)?
5. Match the character descriptor (as
reported by
ls –l
) with the type of file
a. -
i. directory
b. b
ii. symbolic
link
440
◾
Linux with Operating System Concepts
c. c
iii. domain
socket
d. d
iv. regular
file
e. l
v. block device
f. p
vi. character
device
g. s
vii. named
pipe
6. What type of device is a USB drive?
7. What type of device is a modem?
8. What does the command
mkfifo foo
do?
9. You
have created a named pipe, mypipe, and performed
wc*
>
mypipe
. What
happens? How do you complete the pipe?
10. Assume an inode stores 10 direct pointers and 2 indirect pointers (no doubly or triply
indirect pointers). Assume that an indirect block stores 10 pointers. How many disk
blocks could the largest file contain if this was the case?
11. Assume an inode stores 12 direct pointers, 2 indirect pointers, 2
doubly indirect
pointers, and 1 triply indirect pointer. Assume that an indirect block stores 24 point-
ers. How many disk blocks could the largest file contain in this case?
12. What is an i-list?
13. Provide two ways to obtain a file’s inode number.
14. You issue the instruction
stat –c "%h" somefile
and the response is 3. What
does this mean?
15. How does the -f option alter how stat works?
16. Why do you need to partition a Linux file system?
17. If you were to install Linux, which partitions would you create and why?
18. An optical drive will often have partition options of: ro, noauto, user, exec. Explain
what each means and why specifically we would find each of these for the optical drive.
19. Under what circumstance would you specify the ro option for a remotely mounted
Do'stlaringiz bilan baham: