1. dumpe2fs –h /dev/sda1 查询整个磁盘情况( 其中后边的设备名可以换 )
2. df –h , du –h 查询磁盘容量情况
3. 实体链接和符号链接
实体链接: ln mk.txt ../asdf
符号链接: ln –s /tmp/practice/mk.txt /tmp/asdf (符号链接要给出完整路径, 而且源文件和目标文件都要全路径)
ln –sf ( 其中 f 表示如果目标文件已经存在, 就将目标文件删除, 重新建立 )
4. 新硬盘
- 首先是分区 fdisk 根据提示
- 然后是格式化 mkfs –t ext3 /dev/sda1
- 挂载 mount /dev/sda2 /mnt/hdc1 ( umount /mnt/hdc1 )
( fdisk –l 可以查看挂载信息 )
mount –o ( o 是 optional 的意思, 即可以选择挂载的方式 )
loop: 把一个文件当成磁盘分区来挂载 # 比如你用 dd 创建了一个大的文件, 想挂载就的用这个参数
ro: 采用只读方式挂载设备
rw: 采用读写方式挂载设备