linux文件系统管理(文档)

上传人:aa****6 文档编号:56793898 上传时间:2018-10-15 格式:PPT 页数:75 大小:627.50KB
返回 下载 相关 举报
linux文件系统管理(文档)_第1页
第1页 / 共75页
linux文件系统管理(文档)_第2页
第2页 / 共75页
linux文件系统管理(文档)_第3页
第3页 / 共75页
linux文件系统管理(文档)_第4页
第4页 / 共75页
linux文件系统管理(文档)_第5页
第5页 / 共75页
点击查看更多>>
资源描述

《linux文件系统管理(文档)》由会员分享,可在线阅读,更多相关《linux文件系统管理(文档)(75页珍藏版)》请在金锄头文库上搜索。

1、Linux的文件系统,Windows FAT16,FAT32, NTFS 传统UNIX: UFS (Unix File System) BSD文件系统FFS(Fast File System) Proc File System:只存在于内存中 Linux File System ISO9660标准CDROM文件系统,允许长文件名 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

2、.x ,default in RedHat now) xfs (from SGI ) Jfs (from IBM ) 嵌入式小型文件系统 CRAMFS JFFS2,Linux系统兼容的文件系统 UMSDOS:Linux下的MSDOS文件系统驱动。支持长文件名、所有者。 MSDOS:支持8+3文件格式。 VFAT:Windows下使用的DOS文件系统,支持长文件名 HPFT:高性能文件系统,。 SMB:支持SMB的网络操作系统。 NTFS:,2.1.2 Linux文件介绍,文件与文件名 文件名长度限制在255个字符范围内。 文件的类型 普通文件 文本文件 二进制文件 目录文件:用于管理和组织系统

3、中的大量文件 设备文件:Linux将每一个I/O设备都看成是一个文件。,Linux目录介绍,树型目录结构 工作目录与用户主目录和路径 用户登录后,总处于某个目录中,称为工作目录或者当前目录。 用户主目录是系统管理员增加用户时建立的。 用户可以通过“”引用自己的主目录。 路径:指从树型目录的某个目录层次到某个文件的一条道路。,linux文件系统目录布局,To comply with FSSTND(File System STaNDard):/ - first of mount point in linux /etc - keep linux default configuration /boot

4、 - 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 p

5、seudo 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,UNIX文件系统文件类型,Directory catalog

6、ue of file name Normal file format of data source file text file Symbolic link a pointer to another file Special file use for device controller in kernel Named pipe communication channel which can be used by serveral processes(may be irrelevant) in order to exchange data,硬链接(Hard Link),rootlocalhost

7、 link# ls -l total 1 -rw-r-r- 1 root root 667 Oct 15 13:39 a rootlocalhost link# ln a b rootlocalhost 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 rootlocalhost link# rm a rm: remove a? y rootlocalhost link# ls -l total 1 -rw-r-r- 1 root root 66

8、7 Oct 15 13:39 b,硬链接(Hard Link),rootlocalhost link# ls -l total 1 -rw-r-r- 1 root root 667 Oct 15 13:39 a rootlocalhost link# ln a b rootlocalhost 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 rootlocalhost link# rm a rm: remove a? y rootlocalhos

9、t link# ls -l total 1 -rw-r-r- 1 root root 667 Oct 15 13:39 b,符号链接(Symbolic link),rootlocalhost symlink# ls -l total 1 -rw-r-r- 1 root root 667 Oct 15 13:39 a rootlocalhost symlink# ln -s a b rootlocalhost symlink# ls -l total 1 -rw-r-r- 1 root root 667 Oct 15 13:39 a lrwxrwxrwx 1 root root 1 Oct 15

10、 14:20 b - a rootlocalhost yy# rm a rm: remove a? y rootlocalhost symlink# ls -l total 0 lrwxrwxrwx 1 root root 1 Oct 15 14:20 b - a rootlocalhost symlink# cat b cat: b: No such file or directory,VFS(Virtual FileSystem)的作用,Virtual File System,Ext2,Ext3,.,Buffer Cache,Device Driver,Process Control Su

11、bsystem,System Call Interface,User Programs,Inter-process communication,Scheduler,Memory management,Hardware,基于VFS的文件访问,使用命令,命令的使用方式 在Linux系统中打开终端的方式有以下两种: 种是在桌面上依次单击“主程序系统工具终端”可打开如图2-1的终端窗口;另一种是在Linux桌面上单击鼠标右键,从弹出的快捷菜单中选择“终端”命令,也可打开终端窗口。,一般的Linux使用者均为普通用户,而系统管理员一般使用超级用户帐号完成一些系统管理的工作 。,不同的用户登录其终端的提示

12、符略有不同,系统管理员的提示符是“#”,普通用户的提示符是“$”,Linux系统是以全双工的方式工作,即从键盘把字符输入系统,系统再将字符回送到终端并显示出来。通常,回送到终端的字符与输入字符相同,因此操作员看到的正是自己输入的字符。但也有个别的时候,系统不回送符号。,终端显示提示符后,用户就可以输入命令请示系统执行。 例1:rootlbliubing root# date日 2月 1 15:49:11 CST 2004例2:rootlbliubing root# whoroot :0 Feb 1 15:41root pts/0 Feb 1 15:46 (:0.0)jl pts/1 Feb 1

13、 15:40 (:0.0),例3: rootlbliubing root# who am iroot pts/0 Feb 1 15:46 (:0.0)rootlbliubing root# whom whom: unable to open /root/Mail/draft: 没有那个文件或目录 上面几条命令在终端中的输入方法及响应如图2-3所示。,另外,在终端上还有一个命令补齐(Command-Line Completion)的操作技巧,所谓命令补齐是指当键入的字符足以确定目录中一个唯一的文件时,只须按 Tab 键就可以自动补齐该文件名的剩下部分,例如要把目录 /freesoft 下的文件

14、gcc-2.8.1.tar.gz 解包,当键入到 tar xvfz /freesoft/g 时,如果此文件是该目录下唯一以 g开头的文件,这时就可以按下 Tab 键,这时命令会被自动补齐为:tar xvfz /freesoft/gcc-2.8.1.tar.gz ,非常方便,特殊字符,在Linux系统的终端中有几个最有用的bash变量,这些变量变量名及简单描述如下: HISTFILE: 用于贮存历史命令的文件。 HISTSIZE: 历史命令列表的大小。 HOME: 当前用户的用户目录。 OLDPWD: 前一个工作目录。 PATH: bash寻找可执行文件的搜索路径。 PS1: 命令行的一级提示符

15、。 PS2: 命令行的二级提示符。 PWD: 当前工作目录。 SECONDS: 当前shell开始后所流逝的秒数。,这意味着 bash 保留了一定数目的先前已经在shell 里输入过的命令。这个数目取决于一个叫做HISTSIZE的变量。 使用历史记录列表最简单的方法是用上方向键。 另一个使用命令历史文件的方法是用 bash 的内部命令 history 和 fc(fix 命令)命令来显示和编辑历史命令。history 命令能以两种不同的方法来调用。第一种是: history n 当 history 命令没有参数时,整个历史命令列表的内容将被显示出来。使用 n 参数的作用是仅有最后 n 个历史命令会被列出 。例如,history 5 显示最后 5 个命令。 调用 history 命令的第二种方法用于修改命令历史列表文件的内容。命令的语法如下: history -r|w|a|n filename,

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > PPT模板库 > 教育/培训/课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号