链接文件
软链接可以跨分区链接但是不能将原文件删除
硬链接不可以跨分区但是可以删除源文件(硬链接不可以指向文件夹)
1.软链接
[root@localhost ~]# ln -s test test1
2.硬链接
[root@localhost ~]# ln test/filetest filetest1
压缩及解压缩
1.gzip
描述:压缩与解压缩
用法: gzip -选项 文件名称
选项:-d 解压
[root@localhost test]# gzip filetest #压缩后文件后缀名为.gz
[root@localhost test]# gzip -d filetest
2.bzip
描述:压缩与解压缩
用法: bzip2 -选项 文件名称
选项:-d 解压
[root@localhost test]# bzip2 filetest #压缩后后缀名为.bz2
[root@localhost test]# bzip2 -d filetest
# gzip与bzip2 不能直接打包文件目录
3.tar
描述:打包与解包文件
用法: tar -模式 -选项 路径
模式:-c 解压
-r 追加文件到打包文档
-delete 从打包文件中删除文件
-t 列出打包文件的内容
-x 释放打包文件
选项:-C 指定解压路径
-f 指定打包后的文件名称
-j 打包后通过bzip2格式压缩
-z 打包后通过gzip压缩
[root@localhost ~]# tar -czf etc.tar.gz test #打包test 压缩为gzip
[root@localhost ~]# tar -cjf etc.tar.bz2 test #打包test 压缩为bz2
[root@localhost ~]# tar -xzf etc.tar.gz #解压
帮助(man,info,help)
man
用途:查看帮助(详细)
用法:例如查看ls
[root@localhost ~]# man ls
info
用途:查看帮助(与man类似模块化)
用法:例如查看ls
[root@localhost ~]# info ls
help
用途:查看帮助(简略版)
用法:例如查看ls
[root@localhost ~]# ls --help