

一 磁盘管理
1 )磁盘空间检测命令: df
df 命令显示当前系统中,各个逻辑磁盘(文件系统)中空闲磁盘块(512字节/块)和空闲的索引节点(即可建立的新的文件数)。
例如:

2 ) 磁盘使用情况的统计:du
du命令统计指定目录及其所有子目录的磁盘使用情况,单位为磁盘块数。
例如:缺省的是只统计当前目录
du -a dir 统计当前目录和其子目录

二 文件系统管理 :fsck
:fsck (file system check) 只有超级用户才有这个权限
作用:检测和修复文件中的一些错误


三 文件的存储与备份 ——tar 命令
作用:tar命令可把文件系统中的一个或者一组文件打成一个文件包,存放到外存(磁盘或者软盘等)上,或者硬盘上文件系统的其他地方。常用于多个文件包括目录的备份和转移。
$ tar -cvf target file1 file2 file3 ... (c: create创建;v:verify 检测;f file主要指存到目标文件)
将file1 file2 file3 中的文件备份到target文件中
$ tar -c -v -f target file1 file2 file3 ...
$ tar -tvf target (t: test)检查target文件中包含的文件信息
$ tar -xvf target [file] (x exchange 恢复) 从target文件中提取出全部或file指定的文件


四 系统启停




















网友评论