update
This commit is contained in:
parent
c44b44d6a9
commit
d8d621a4d9
@ -5,7 +5,7 @@
|
|||||||
3. 字符设备,符号为 `c`
|
3. 字符设备,符号为 `c`
|
||||||
4. 块设备,符号为 `b`
|
4. 块设备,符号为 `b`
|
||||||
5. 套接字文件,符号为 `s`
|
5. 套接字文件,符号为 `s`
|
||||||
6. 软链接文件,类似 ·Windows· 系统的快捷方式,删除了并不会影响源文件,符号为 `l`
|
6. 软链接文件,类似 `Windows` 系统的快捷方式,删除了并不会影响源文件,符号为 `l`
|
||||||
7. 管道文件,符号为 `p`
|
7. 管道文件,符号为 `p`
|
||||||
|
|
||||||
补充:常见的文件类型为 `-` `d` `l`
|
补充:常见的文件类型为 `-` `d` `l`
|
||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
- 其它人(others)
|
- 其它人(others)
|
||||||
|
|
||||||
解读
|
#### 解读
|
||||||
|
|
||||||
```
|
```
|
||||||
-rw-rw-r-- 1 nick nick 0 May 12 16:05 demo.php
|
-rw-rw-r-- 1 nick nick 0 May 12 16:05 demo.php
|
||||||
|
2
git.md
2
git.md
@ -37,7 +37,7 @@ git checkout . #恢复暂存区的所有文件到工作区
|
|||||||
|
|
||||||
git checkout file #恢复暂存区的指定文件到工作区
|
git checkout file #恢复暂存区的指定文件到工作区
|
||||||
|
|
||||||
git checkout af442cb672b02cdfca1fcb index.php 恢复某个commit的指定文件到暂存区和工作区
|
git checkout af442cb672b02cdfca1fcb index.php 恢复某个 commit 的指定文件到暂存区和工作区
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,37 +1,38 @@
|
|||||||
#### tar 打包压缩命令
|
#### tar 打包压缩命令
|
||||||
|
|
||||||
```
|
```
|
||||||
tar -czvf filename.tar.gz test #打包test目录并使用gzip压缩并显示文件信息
|
tar -czvf filename.tar.gz test #打包 test 目录并使用 gzip 压缩并显示文件信息
|
||||||
|
|
||||||
tar -xzvf filename.tar.gz #解压gzip文件并输出文件信息
|
tar -xzvf filename.tar.gz #解压 gzip 文件并输出文件信息
|
||||||
|
|
||||||
tar -cjvf filename.tar.bz2 test #打包test目录并使用gzip2压缩并显示文件信息
|
tar -cjvf filename.tar.bz2 test #打包 test 目录并使用 gzip2 压缩并显示文件信息
|
||||||
|
|
||||||
tar -xjvf filename.tar.bz2 #解压使用gzip2压缩并显示文件信息
|
tar -xjvf filename.tar.bz2 #解压使用 gzip2 压缩并显示文件信息
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
补充:`-v` 为显示信息
|
补充:`-v` 为显示信息
|
||||||
|
|
||||||
#### zip 压缩命令,文件后缀.zip
|
#### zip 压缩命令,文件后缀.zip
|
||||||
|
|
||||||
```
|
```
|
||||||
zip html.zip ./html #压缩当前目录下html目录或文件
|
zip html.zip ./html #压缩当前目录下 html 目录或文件
|
||||||
|
|
||||||
unzip html.zip #解压在当前目录或文件
|
unzip html.zip #解压在当前目录或文件
|
||||||
|
|
||||||
zip -qr html.zip ./html #将当前html目录递归压缩保存文件名为html.zip
|
zip -qr html.zip ./html #将当前 html 目录递归压缩保存文件名为 html.zip
|
||||||
|
|
||||||
unzip html.zip #解压在当前目录
|
unzip html.zip #解压在当前目录
|
||||||
|
|
||||||
unzip -o html.zip -d /usr/local/ #解压html.zip文件到/usr/local/下
|
unzip -o html.zip -d /usr/local/ #解压 html.zip 文件到 /usr/local/ 下
|
||||||
|
|
||||||
zip -qr html.zip ./html #将当前html目录递归压缩为html.zip
|
zip -qr html.zip ./html #将当前html目录递归压缩为 html.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
#### gzip 压缩命令,文件后缀.gz
|
#### gzip 压缩命令,文件后缀.gz
|
||||||
|
|
||||||
```
|
```
|
||||||
gzip index.php #压缩index.php文件,文件名为index.php.gz,不会保留原文件
|
gzip index.php #压缩 index.php 文件,文件名为 index.php.gz ,不会保留原文件
|
||||||
|
|
||||||
gunzip index.php.gz #解压文件
|
gunzip index.php.gz #解压文件
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ gzip -d index.php.gz #解压文件
|
|||||||
#### bzip2 压缩命令,文件后缀.bz2
|
#### bzip2 压缩命令,文件后缀.bz2
|
||||||
|
|
||||||
```
|
```
|
||||||
bzip2 index.php #压缩index.php文件,文件名为index.php.bz2,不会保留原文件
|
bzip2 index.php #压缩 index.php 文件,文件名为 index.php.bz2 ,不会保留原文件
|
||||||
|
|
||||||
bunzip2 index.php.bz2 #解压文件
|
bunzip2 index.php.bz2 #解压文件
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user