6. The Filesystem
The filesystem can be thought of as comprising four main components:
A namespace, an API, a security model, and An implementation
6.1 Pathnames
Absolute and relative paths
Spaces in filenames
6.2 Filesystem mounting and unmounting
mount /dev/sda4 /users # /dev/sda4 is filesystem, /users is mounting point
umount [-l | -f]
fusers -c /usr
lsof
6.3 The organization of the file tree
6.4 File types
Regular files
Directories
mkdir, rmdir, rm -r
., ..
links: ln old new
Character device files
Block device files
Local domain sockets
Named pipes(FIFOs)
Symbolic links
ln -s old new
6.5 File attributes
12 mode bits + 4 file-type bits
The permission bits
9 permission bits: rwxrwxrwx
The setuid and setgid bits
setuid: 4000
setgid: 2000
The sticky bit
1000
ls: list and inspect files
chmod: change permissions
chown and chgrp: change ownership and group
chown user:group file...
umask: assign default permissions
Linux bonus flags
6.6 Access control list
A short and brutal history of UNIX ACLs
ACL implementation
ACL support by system
POSIX ACLs
NFSv4 ACLs
6.7 Exercises
阅读(1230) | 评论(0) | 转发(0) |