1
Linux File System
文件系统
VFS 的作用
基于 VFS 的文件访问
VFS 重要数据结构
文件系统的注册与安装
、 文件系统
文件操作
文件系统
文件系统
2
各种各样的文件系统
各种各样的文件系统
Windows FAT16,FAT32, NTFS
Windows FAT16,FAT32, NTFS
传统 UNIX: UFS (Unix File System)
BSD 文件系统 FFS(Fast File System)
Proc File System :只存在于内存中
Linux File System
–
ext2 ( is first introduced in kernel 2.0.x )
–
reiserfs ( is first introduced in kernel 2.2.x )
–
ext3 ( is first introduced in kernel 2.4.x ,default in RedHat now)
–
xfs (from SGI )
–
Jfs (from IBM )
嵌入式小型文件系统
CRAMFS
JFFS2
3
linux
linux
文件系统目录布局
文件系统目录布局
To comply with FSSTND(File System
STaNDard):
/ - first of mount point in linux
/etc - keep linux default configuration
/boot - keep important linux booting files(can be a separate file
system)
/bin - Essential command binaries for both root and ord. users
/sbin - Essential system binaries for administrator
/dev - keep all device files
/usr - keep all user binary and X library
/home - keep user home directory
/proc - is pseudo file system for tracking running process and
state of linux system
/var - keeping mail, log file and printer spooling
/lib - contain shared library that is required by system
program
/tmp - contain system temporary file
/opt - Add-on application software packages
4
UNIX 文件系统文件类型
!
"
#
"
$%&
#!'%
!&(&
&$#!$#'###)
$'*!&!
5
硬链接( Hard Link )
[root@localhost link]# ls -l
total 1
-rw-r--r-- 1 root root 667 Oct 15 13:39 a
[root@localhost link]# ln a b
[root@localhost link]# ls -l
total 2
-rw-r--r-- 2 root root 667 Oct 15 13:39 a
-rw-r--r-- 2 root root 667 Oct 15 13:39 b
[root@localhost link]# rm a
rm: remove `a'? y
[root@localhost link]# ls -l
total 1
-rw-r--r-- 1 root root 667 Oct 15 13:39 b
inode
/root/link
a
b