From 635103a88cd3a1c76b3286b8d872d4c48bb65cab Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sun, 13 Feb 2022 23:12:09 +0800
Subject: [PATCH 001/566] chore: update .github/workflows/ci.yml
---
.github/workflows/ci.yml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cc0e3616733..51bab3ae200 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,7 +15,7 @@ jobs:
- name: Generate Changelog
id: changelog
- uses: jaywcjlove/changelog-generator@v1.4.6
+ uses: jaywcjlove/changelog-generator@v1.4.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-author: (小弟调调™|Renovate Bot)
@@ -27,6 +27,13 @@ jobs:
- run: npm run dash
- run: rm -rf .deploy/linux-command.docset
+ - name: Generate Contributors Images
+ uses: jaywcjlove/github-action-contributors@main
+ with:
+ filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
+ output: .deploy/CONTRIBUTORS.svg
+ avatarSize: 42
+
- run: npm install @jsdevtools/npm-publish -g
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
@@ -40,7 +47,7 @@ jobs:
- name: Create Tag
id: create_tag
- uses: jaywcjlove/create-tag-action@v1.2.1
+ uses: jaywcjlove/create-tag-action@v1.3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./package.json
From c3a24f2a316e5ef4e21c7a340f43d0b3f77799c1 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sun, 13 Feb 2022 23:16:43 +0800
Subject: [PATCH 002/566] doc: Update README.md
---
README.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/README.md b/README.md
index 04d92550b54..39f42cac71d 100644
--- a/README.md
+++ b/README.md
@@ -253,3 +253,17 @@ https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/<命
[![小弟调调™](https://github.com/jaywcjlove.png?size=100)](https://github.com/jaywcjlove) | [![ZhuangZhu-74](https://github.com/ZhuangZhu-74.png?size=100)](https://github.com/ZhuangZhu-74) | [![Huck Huang](https://github.com/huckhuang.png?size=100)](https://github.com/huckhuang)
---|---|---
[小弟调调™](http://wangchujiang.com) | [ZhuangZhu-74](https://github.com/ZhuangZhu-74) | [Huck Huang](https://github.com/huckhuang)
+
+## Contributors
+
+As always, thanks to our amazing contributors!
+
+
+
+
+
+Made with [github-action-contributors](https://github.com/jaywcjlove/github-action-contributors).
+
+## License
+
+Licensed under the MIT License.
\ No newline at end of file
From bc49f6f7e74487940b71f8fc815a796444b906ab Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Mon, 14 Feb 2022 10:44:19 +0800
Subject: [PATCH 003/566] feat: Add contributors pages.
---
build/build.mjs | 19 +++++++++++++++++++
template/contributors.ejs | 8 ++++++++
template/styl/index.styl | 9 ++++++++-
template/widget/footer.ejs | 2 +-
4 files changed, 36 insertions(+), 2 deletions(-)
create mode 100644 template/contributors.ejs
diff --git a/build/build.mjs b/build/build.mjs
index ef04b022a75..c8aaa2ddce7 100644
--- a/build/build.mjs
+++ b/build/build.mjs
@@ -12,6 +12,7 @@ const rootIndexJSPath = path.resolve(process.cwd(), 'template', 'js', 'index.js'
const dataJsonPath = path.resolve(process.cwd(), 'dist', 'data.json');
const dataJsonMinPath = path.resolve(process.cwd(), 'dist', 'data.min.json');
const cssPath = path.resolve(deployDir, 'css', 'index.css');
+const contributorsPath = path.resolve(deployDir, 'CONTRIBUTORS.svg');
;(async () => {
try {
@@ -71,6 +72,24 @@ const cssPath = path.resolve(deployDir, 'css', 'index.css');
command_length: jsonData.data.length
}
);
+
+ let svgStr = '';
+ if (FS.existsSync(contributorsPath)) {
+ svgStr = (await FS.readFile(contributorsPath)).toString();
+ }
+
+ await createTmpToHTML(
+ path.resolve(process.cwd(), 'template', 'contributors.ejs'),
+ path.resolve(deployDir, 'contributors.html'),
+ {
+ p: '/contributors.html',
+ n: '搜索',
+ d: '最专业的Linux命令大全,命令搜索引擎,内容包含Linux命令手册、详解、学习,值得收藏的Linux命令速查手册。',
+ arr: jsonData.data,
+ command_length: jsonData.data.length,
+ contributors: svgStr,
+ }
+ );
await Promise.all(jsonData.data.map(async (item, idx) => {
item.command_length = jsonData.data.length;
diff --git a/template/contributors.ejs b/template/contributors.ejs
new file mode 100644
index 00000000000..cfdb75dbd4c
--- /dev/null
+++ b/template/contributors.ejs
@@ -0,0 +1,8 @@
+<%- include('partial/header'); %>
+<%- include('widget/search',{type: "list"}); %>
+
+
Contributors
+
<%=describe.contributors ? describe.contributors : '' %>
+
+<%- include('widget/footer',{type: "list"}); %>
+<%- include('partial/footer'); %>
diff --git a/template/styl/index.styl b/template/styl/index.styl
index c61b8283ea6..7548edc80cc 100644
--- a/template/styl/index.styl
+++ b/template/styl/index.styl
@@ -295,11 +295,18 @@ a {
}
}
-.header_inner, .hotlist, .search_list {
+.header_inner, .hotlist, .search_list, .contributors {
max-width 920px
margin 0 auto
}
+.contributors {
+ padding 79px 27px
+ a {
+ font-weight: bold;
+ }
+}
+
@media mq-mobile {
.header{
width inherit
diff --git a/template/widget/footer.ejs b/template/widget/footer.ejs
index d442a410688..a749792631c 100644
--- a/template/widget/footer.ejs
+++ b/template/widget/footer.ejs
@@ -15,5 +15,5 @@
共搜集到
<%=describe.command_length?describe.command_length:''%>
- 个Linux命令
+ 个Linux命令,超过 50+ 的贡献者
\ No newline at end of file
From cabc3b036a305f69580ea3280f6b407149b339f7 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Mon, 14 Feb 2022 10:50:31 +0800
Subject: [PATCH 004/566] fix: Fixed reading issue with CONTRIBUTORS.svg file.
---
.github/workflows/ci.yml | 14 +++++++-------
build/build.mjs | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 51bab3ae200..a46ff895af3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,19 +21,19 @@ jobs:
filter-author: (小弟调调™|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
-
- - run: npm install
- - run: npm run build
- - run: npm run dash
- - run: rm -rf .deploy/linux-command.docset
-
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
- output: .deploy/CONTRIBUTORS.svg
+ output: CONTRIBUTORS.svg
avatarSize: 42
+ - run: npm install
+ - run: npm run build
+ - run: npm run dash
+ - run: rm -rf .deploy/linux-command.docset
+ - run: cp -rp CONTRIBUTORS.svg .deploy/
+
- run: npm install @jsdevtools/npm-publish -g
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
diff --git a/build/build.mjs b/build/build.mjs
index c8aaa2ddce7..cec0024695f 100644
--- a/build/build.mjs
+++ b/build/build.mjs
@@ -12,7 +12,7 @@ const rootIndexJSPath = path.resolve(process.cwd(), 'template', 'js', 'index.js'
const dataJsonPath = path.resolve(process.cwd(), 'dist', 'data.json');
const dataJsonMinPath = path.resolve(process.cwd(), 'dist', 'data.min.json');
const cssPath = path.resolve(deployDir, 'css', 'index.css');
-const contributorsPath = path.resolve(deployDir, 'CONTRIBUTORS.svg');
+const contributorsPath = path.resolve(process.cwd(), 'CONTRIBUTORS.svg');
;(async () => {
try {
From e19ed19e8fa44b2c7358583bcc1787656fefed4e Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Mon, 14 Feb 2022 10:57:30 +0800
Subject: [PATCH 005/566] fix: Fix template/contributors.ejs issue.
---
template/contributors.ejs | 5 ++++-
template/widget/footer.ejs | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/template/contributors.ejs b/template/contributors.ejs
index cfdb75dbd4c..66dca26ab5b 100644
--- a/template/contributors.ejs
+++ b/template/contributors.ejs
@@ -2,7 +2,10 @@
<%- include('widget/search',{type: "list"}); %>
<%- include('widget/footer',{type: "list"}); %>
<%- include('partial/footer'); %>
diff --git a/template/widget/footer.ejs b/template/widget/footer.ejs
index a749792631c..3fbc6d6ac19 100644
--- a/template/widget/footer.ejs
+++ b/template/widget/footer.ejs
@@ -15,5 +15,5 @@
共搜集到
<%=describe.command_length?describe.command_length:''%>
- 个Linux命令,超过 50+ 的贡献者
+ 个Linux命令,超过 50+ 贡献者
\ No newline at end of file
From f708e394049895949dc44542853b239f30aff0e8 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Mon, 14 Feb 2022 11:03:02 +0800
Subject: [PATCH 006/566] website: update website style.
---
template/styl/index.styl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/template/styl/index.styl b/template/styl/index.styl
index 7548edc80cc..dcde15b46ed 100644
--- a/template/styl/index.styl
+++ b/template/styl/index.styl
@@ -301,7 +301,8 @@ a {
}
.contributors {
- padding 79px 27px
+ padding 79px 27px
+ font-size: 16px
a {
font-weight: bold;
}
From bb4d67a71b053c44a96cb96269d658d548853fcc Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Mon, 14 Feb 2022 11:19:03 +0800
Subject: [PATCH 007/566] website: update website style.
---
template/styl/index.styl | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/template/styl/index.styl b/template/styl/index.styl
index dcde15b46ed..10c811a16b9 100644
--- a/template/styl/index.styl
+++ b/template/styl/index.styl
@@ -302,7 +302,14 @@ a {
.contributors {
padding 79px 27px
- font-size: 16px
+ max-width: 960px;
+ margin: 28px auto 60px auto;
+ color: #24292f;
+ background-color: #ffffff;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
+ font-size: 16px;
+ line-height: 1.5;
+ word-wrap: break-word;
a {
font-weight: bold;
}
From 94ed285caa5afa3527c0e82d67635901359bc853 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Mon, 14 Feb 2022 13:58:31 +0800
Subject: [PATCH 008/566] website: update website style.
---
template/styl/index.styl | 1 -
1 file changed, 1 deletion(-)
diff --git a/template/styl/index.styl b/template/styl/index.styl
index 10c811a16b9..4a26bc9270d 100644
--- a/template/styl/index.styl
+++ b/template/styl/index.styl
@@ -303,7 +303,6 @@ a {
.contributors {
padding 79px 27px
max-width: 960px;
- margin: 28px auto 60px auto;
color: #24292f;
background-color: #ffffff;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
From a78e4a0cda07ec95c84a1eb25f12f145cc7f405d Mon Sep 17 00:00:00 2001
From: Marnm <2461590502@qq.com>
Date: Sat, 19 Feb 2022 21:42:47 +0800
Subject: [PATCH 009/566] Update nmcli.md (#333)
---
command/nmcli.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/command/nmcli.md b/command/nmcli.md
index 6258e3a6cc0..ccf4cf5bcb6 100644
--- a/command/nmcli.md
+++ b/command/nmcli.md
@@ -53,3 +53,14 @@ nmcli con add help # 查看帮助
```
+### 创建网络会话
+```shell
+nmcli connection add con-name company ifname ens33 autoconnect no type ethernet ip4 192.168.1.2/24 gw4 192.168.1.1
+# con-name 指定会话名称,
+# ifname 指定本机网卡
+# autoconnect no 是否自动连接
+# ethernet 指定网卡类型
+# ip4/ip6
+# gw4/gw5
+```
+
From 710a833cf3d76fb4214ace3f03598a1e086e27f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?=
<398188662@qq.com>
Date: Sat, 19 Feb 2022 21:43:07 +0800
Subject: [PATCH 010/566] Update nmcli.md
---
command/nmcli.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/command/nmcli.md b/command/nmcli.md
index ccf4cf5bcb6..1a30fdf2ca5 100644
--- a/command/nmcli.md
+++ b/command/nmcli.md
@@ -54,6 +54,7 @@ nmcli con add help # 查看帮助
```
### 创建网络会话
+
```shell
nmcli connection add con-name company ifname ens33 autoconnect no type ethernet ip4 192.168.1.2/24 gw4 192.168.1.1
# con-name 指定会话名称,
From a49d92b298cba5f12774fd118a8008e40233a6fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?=
<398188662@qq.com>
Date: Sun, 20 Feb 2022 02:23:57 +0800
Subject: [PATCH 011/566] Update nmcli.md
---
command/nmcli.md | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/command/nmcli.md b/command/nmcli.md
index 1a30fdf2ca5..f340f7ed2a2 100644
--- a/command/nmcli.md
+++ b/command/nmcli.md
@@ -40,16 +40,16 @@ OBJECT
### 实例
```shell
-nmcli connection show # 查看当前连接状态
-nmcli connection reload # 重启服务
-nmcli connection show -active # 显示活动的连接
-nmcli connection show "lan eth0"# 显示指定一个网络连接配置
-nmcli device status # 显示设备状态
-nmcli device show eno16777736 # 显示指定接口属性
-nmcli device show # 显示全部接口属性
-nmcli con up static # 启用static连接配置
-nmcli con up default # 启用default连接配置
-nmcli con add help # 查看帮助
+nmcli connection show # 查看当前连接状态
+nmcli connection reload # 重启服务
+nmcli connection show -active # 显示活动的连接
+nmcli connection show "lan eth0" # 显示指定一个网络连接配置
+nmcli device status # 显示设备状态
+nmcli device show eno16777736 # 显示指定接口属性
+nmcli device show # 显示全部接口属性
+nmcli con up static # 启用static连接配置
+nmcli con up default # 启用default连接配置
+nmcli con add help # 查看帮助
```
From 5cf755b37b8df126d54d5706a15084883a5fd2a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?=
<398188662@qq.com>
Date: Tue, 22 Feb 2022 17:09:40 +0800
Subject: [PATCH 012/566] Update ln.md
---
command/ln.md | 71 ++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 53 insertions(+), 18 deletions(-)
diff --git a/command/ln.md b/command/ln.md
index 264d059d7e4..f1afe832443 100644
--- a/command/ln.md
+++ b/command/ln.md
@@ -21,22 +21,22 @@ ln [选项]... [-T] 目标 链接名 (第一种格式)
### 选项
```shell
- --backup[=CONTROL] 为每个已存在的目标文件创建备份文件
--b 类似--backup,但不接受任何参数
--d, -F, --directory 创建指向目录的硬链接(只适用于超级用户)
--f, --force 强行删除任何已存在的目标文件
--i, --interactive 覆盖既有文件之前先询问用户
--L, --logical 取消引用作为符号链接的目标
--n, --no-dereference 把符号链接的目的目录视为一般文件
--P, --physical 直接将硬链接到符号链接
--r, --relative 创建相对于链接位置的符号链接
--s, --symbolic 对源文件建立符号链接,而非硬链接
--S, --suffix=SUFFIX 用"-b"参数备份目标文件后,备份文件的字尾会被加上一个备份字符串,预设的备份字符串是符号“~”,用户可通过“-S”参数来改变它
--t, --target-directory=DIRECTORY 指定要在其中创建链接的DIRECTORY
--T, --no-target-directory 将“LINK_NAME”视为常规文件
--v, --verbose 打印每个链接文件的名称
- --help 显示此帮助信息并退出
- --version 显示版本信息并退出
+--backup[=CONTROL] # 为每个已存在的目标文件创建备份文件
+-b # 类似--backup,但不接受任何参数
+-d, -F, --directory # 创建指向目录的硬链接(只适用于超级用户)
+-f, --force # 强行删除任何已存在的目标文件
+-i, --interactive # 覆盖既有文件之前先询问用户
+-L, --logical # 取消引用作为符号链接的目标
+-n, --no-dereference # 把符号链接的目的目录视为一般文件
+-P, --physical # 直接将硬链接到符号链接
+-r, --relative # 创建相对于链接位置的符号链接
+-s, --symbolic # 对源文件建立符号链接,而非硬链接
+-S, --suffix=SUFFIX # 用"-b"参数备份目标文件后,备份文件的字尾会被加上一个备份字符串,预设的备份字符串是符号“~”,用户可通过“-S”参数来改变它
+-t, --target-directory=DIRECTORY # 指定要在其中创建链接的DIRECTORY
+-T, --no-target-directory # 将“LINK_NAME”视为常规文件
+-v, --verbose # 打印每个链接文件的名称
+--help # 显示此帮助信息并退出
+--version # 显示版本信息并退出
```
### 参数
@@ -53,7 +53,7 @@ simple, never # 永远使用普通方式备份
### 实例
-将目录`/usr/mengqc/mub1`下的文件m2.c链接到目录`/usr/liu`下的文件a2.c
+将目录`/usr/mengqc/mub1` 下的文件 m2.c 链接到目录 `/usr/liu` 下的文件 a2.c
```shell
cd /usr/mengqc
@@ -62,6 +62,8 @@ ln /mub1/m2.c /usr/liu/a2.c
在执行ln命令之前,目录`/usr/liu`中不存在a2.c文件。执行ln之后,在`/usr/liu`目录中才有a2.c这一项,表明m2.c和a2.c链接起来(注意,二者在物理上是同一文件),利用`ls -l`命令可以看到链接数的变化。
+**创建软链接**
+
在目录`/usr/liu`下建立一个符号链接文件abc,使它指向目录`/usr/mengqc/mub1`
```shell
@@ -70,6 +72,27 @@ ln -s /usr/mengqc/mub1 /usr/liu/abc
执行该命令后,`/usr/mengqc/mub1`代表的路径将存放在名为`/usr/liu/abc`的文件中。
+**创建硬链接**
+
+给文件创建硬链接,为 `log2022.log` 创建硬链接 `ln2022`,`log2022.log` 与 `ln2022` 的各项属性相同
+
+```shell
+ln log2022.log ln2022
+```
+
+输出:
+
+```
+[root@localhost test]# ll
+lrwxrwxrwx 1 root root 11 12-07 16:01 link2013 -> log2022.log
+-rw-r--r-- 1 root bin 61 11-13 06:03 log2022.log
+[root@localhost test]# ln log2022.log ln2022
+[root@localhost test]# ll
+lrwxrwxrwx 1 root root 11 12-07 16:01 link2013 -> log2022.log
+-rw-r--r-- 2 root bin 61 11-13 06:03 ln2022
+-rw-r--r-- 2 root bin 61 11-13 06:03 log2022.log
+```
+
## 扩展知识
Linux具有为一个文件起多个名字的功能,称为链接。被链接的文件可以存放在相同的目录下,但是必须有不同的文件名,而不用在硬盘上为同样的数据重复备份。另外,被链接的文件也可以有相同的文件名,但是存放在不同的目录下,这样只要对一个目录下的该文件进行修改,就可以完成对所有目录下同名链接文件的修改。对于某个文件的各链接文件,我们可以给它们指定不同的存取权限,以控制对信息的共享和增强安全性。
@@ -80,10 +103,22 @@ ln功能说明:是为某一个文件在另外一个位置建立一个同步的
> :warning: ln命令会保持每一处链接文件的同步性,也就是说,不论你改动了哪一处,其它的文件都会发生相同的变化。
+### 软链接:
+
+1. 软链接,以路径的形式存在。类似于Windows操作系统中的快捷方式
+2. 软链接可以 跨文件系统 ,硬链接不可以
+3. 软链接可以对一个不存在的文件名进行链接
+4. 软链接可以对目录进行链接
+
### 硬链接
建立硬链接时,在另外的目录或本目录中增加目标文件的一个目录项,这样,一个文件就登记在多个目录中。如下所示的m2.c文件就在目录mub1和liu中都建立了目录项。
+
+1. 硬链接,以文件副本的形式存在。但不占用实际空间。
+2. 不允许给目录创建硬链接
+3. 硬链接只有在同一个文件系统中才能创建
+
```shell
ls -ailR
.:
@@ -116,7 +151,7 @@ total 8
* 不能对目录文件做硬链接。
* 不能在不同的文件系统之间做硬链接。就是说,链接文件和被链接文件必须位于同一个文件系统中。
-### 符号链接
+### 符号链接(软连接)
符号链接也称为软链接,是将一个路径名链接到一个文件。这些文件是一种特别类型的文件。事实上,它只是一个文本文件(如下所示的abc文件),其中包含它提供链接的另一个文件的路径名,如虚线箭头所示。另一个文件是实际包含所有数据的文件。所有读、写文件内容的命令被用于符号链接时,将沿着链接方向前进来访问实际的文件。
From 17ac6121d94244cfade5e95041c907d06e25a22e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?=
<398188662@qq.com>
Date: Wed, 23 Feb 2022 10:15:45 +0800
Subject: [PATCH 013/566] Update alias.md
---
command/alias.md | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git a/command/alias.md b/command/alias.md
index e7c8f282d59..b586cef39d4 100644
--- a/command/alias.md
+++ b/command/alias.md
@@ -21,17 +21,13 @@ alias [-p] [name[=value] ...]
```shell
-p:显示全部已定义的别名。
-```
-
-## 参数
-
name(可选):指定要(定义、修改、显示)的别名。
-
value(可选):别名的值。
+```
### 返回值
-alias返回true除非您要显示的别名未定义。
+alias 返回 true 除非您要显示的别名未定义。
## 例子
@@ -73,7 +69,6 @@ alias ls='ls --color=never' grep='grep --color=never'
## 错误用法
- 要显示的别名未定义。
-
- 当您定义(修改)别名的值的时候,由于值的字符串有空格但您没有用**单引号扩起**,那么会导致严重的问题:
```shell
@@ -112,19 +107,13 @@ A:运行cd依然会切换目录,运行ls依然会列出文件夹的内容;
### 注意
-1. **执行脚本时请注意:**
-
-> 使用`source`命令执行的bash脚本如果执行了`alias`或`unalias`命令,那么有可能会对终端环境的别名设置产生影响;终端环境的别名设置也可能改变运行结果;
->
-> 通过`sh`方式调用的bash脚本或直接运行当前用户有执行权限的脚本不受终端环境的别名影响。
-
+1. 执行脚本时请注意:
+ 1. 使用 `source` 命令执行的bash脚本如果执行了 `alias` 或 `unalias` 命令,那么有可能会对终端环境的别名设置产生影响;终端环境的别名设置也可能改变运行结果;
+ 2. 通过 `sh` 方式调用的 bash 脚本或直接运行当前用户有执行权限的脚本不受终端环境的别名影响。
2. 删除别名,请查看`unalias`命令。
-
-2. 建议您不要对`mv cp rm`等命令的别名设置危险的`-f`选项,比如`alias rm='rm -f'`。
-
-3. 需要注意别名是否和其他命令有冲突的情况。
-
-4. 该命令是bash内建命令,相关的帮助信息请查看`help`命令。
+3. 建议您不要对 `mv cp rm` 等命令的别名设置危险的 `-f` 选项,比如 `alias rm='rm -f'`。
+4. 需要注意别名是否和其他命令有冲突的情况。
+5. 该命令是 bash 内建命令,相关的帮助信息请查看 `help` 命令。
### 其他参考链接
From bde70a417f0f5df90886e01bfd090d71c0ec5f43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?=
<398188662@qq.com>
Date: Wed, 23 Feb 2022 10:16:45 +0800
Subject: [PATCH 014/566] Update alias.md
---
command/alias.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/command/alias.md b/command/alias.md
index b586cef39d4..77e5f2b173c 100644
--- a/command/alias.md
+++ b/command/alias.md
@@ -108,8 +108,8 @@ A:运行cd依然会切换目录,运行ls依然会列出文件夹的内容;
### 注意
1. 执行脚本时请注意:
- 1. 使用 `source` 命令执行的bash脚本如果执行了 `alias` 或 `unalias` 命令,那么有可能会对终端环境的别名设置产生影响;终端环境的别名设置也可能改变运行结果;
- 2. 通过 `sh` 方式调用的 bash 脚本或直接运行当前用户有执行权限的脚本不受终端环境的别名影响。
+ - 使用 `source` 命令执行的bash脚本如果执行了 `alias` 或 `unalias` 命令,那么有可能会对终端环境的别名设置产生影响;终端环境的别名设置也可能改变运行结果;
+ - 通过 `sh` 方式调用的 bash 脚本或直接运行当前用户有执行权限的脚本不受终端环境的别名影响。
2. 删除别名,请查看`unalias`命令。
3. 建议您不要对 `mv cp rm` 等命令的别名设置危险的 `-f` 选项,比如 `alias rm='rm -f'`。
4. 需要注意别名是否和其他命令有冲突的情况。
From aabe4285d3d403e5a0eecf6bd582174f3bde86cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BF=9C=E6=96=B9?=
Date: Thu, 24 Feb 2022 00:37:15 +0800
Subject: [PATCH 015/566] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=20`ls`=20=E4=B8=AD?=
=?UTF-8?q?=E9=94=99=E5=88=AB=E5=AD=97=20`=E5=BD=B1=E8=97=8F`=20=E4=B8=BA?=
=?UTF-8?q?=20`=E9=9A=90=E8=97=8F`=20(#335)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
command/ls.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/command/ls.md b/command/ls.md
index e55bb4ab878..cf09d587b1a 100644
--- a/command/ls.md
+++ b/command/ls.md
@@ -186,7 +186,7 @@ $ ls --human-readable --size -1 -S --classify # 按文件大小排序
$ du -sh * | sort -h # 按文件大小排序(同上)
```
-显示当前目录下包括影藏文件在内的所有文件列表
+显示当前目录下包括隐藏文件在内的所有文件列表
```shell
[root@localhost ~]# ls -a
From c816a0a2eb5f3f9348f48c0ffb5ad21c81b9c127 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?=
<398188662@qq.com>
Date: Thu, 24 Feb 2022 23:10:34 +0800
Subject: [PATCH 016/566] Update README.md
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 39f42cac71d..ed99420f2e1 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,7 @@
[![Web](https://jaywcjlove.github.io/sb/ico/linux.svg)](https://jaywcjlove.github.io/linux-command/) [![weibo](https://jaywcjlove.github.io/sb/ico/weibo.svg)](http://weibo.com/pc175) [![Get this with npm](https://jaywcjlove.github.io/sb/ico/npm.svg)](https://www.npmjs.com/package/linux-command) [![NPM Download](https://img.shields.io/npm/dm/linux-command.svg?style=flat)](https://www.npmjs.com/package/linux-command)
+[![jsdelivr cdn](https://data.jsdelivr.com/v1/package/npm/linux-command/badge)](https://www.jsdelivr.com/package/npm/linux-command)
当前仓库搜集了 570 多个 Linux 命令,是一个非盈利性的仓库,生成了一个 web 网站方便使用,目前网站没有任何广告,内容包含 Linux 命令手册、详解、学习,内容来自网络和网友的补充,非常值得收藏的 Linux 命令速查手册。版权归属原作者,对任何法律问题及风险不承担任何责任,没有任何商业目的,如果认为侵犯了您的版权,请来信告知。我不能完全保证内容的正确性。通过使用本站内容带来的风险与我无关。当使用本站时,代表您已接受了本站的使用条款和隐私条款。
@@ -266,4 +267,4 @@ Made with [github-action-contributors](https://github.com/jaywcjlove/github-acti
## License
-Licensed under the MIT License.
\ No newline at end of file
+Licensed under the MIT License.
From 3572d9f2c553ad4ee3601bb3c575e92934be9bee Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Thu, 3 Mar 2022 19:13:38 +0800
Subject: [PATCH 017/566] chore: update workflows config.
---
.github/workflows/ci.yml | 50 ++++++++++++++++++++++------------------
1 file changed, 28 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a46ff895af3..b6c4b8c673d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,44 +13,43 @@ jobs:
with:
node-version: 14
- - name: Generate Changelog
- id: changelog
- uses: jaywcjlove/changelog-generator@v1.4.8
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- filter-author: (小弟调调™|Renovate Bot)
- filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
+ - run: npm install
+ - run: npm run build
+ - run: npm run dash
+ - run: rm -rf .deploy/linux-command.docset
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
- output: CONTRIBUTORS.svg
+ output: .deploy/CONTRIBUTORS.svg
avatarSize: 42
- - run: npm install
- - run: npm run build
- - run: npm run dash
- - run: rm -rf .deploy/linux-command.docset
- - run: cp -rp CONTRIBUTORS.svg .deploy/
+ - name: Create Tag
+ id: create_tag
+ uses: jaywcjlove/create-tag-action@v1.3.6
+ with:
+ package-path: ./package.json
- - run: npm install @jsdevtools/npm-publish -g
- - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
+ - name: get tag version
+ id: tag_version
+ uses: jaywcjlove/changelog-generator@v1.5.0
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
+ commit_message: '[${{steps.tag_version.outputs.tag}}] ${{ github.event.head_commit.message }}'
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.deploy
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com
-
- - name: Create Tag
- id: create_tag
- uses: jaywcjlove/create-tag-action@v1.3.5
+
+ - name: Generate Changelog
+ id: changelog
+ uses: jaywcjlove/changelog-generator@v1.5.0
with:
- token: ${{ secrets.GITHUB_TOKEN }}
- package-path: ./package.json
+ filter-author: (小弟调调™)
+ filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- name: Create Release
uses: ncipollo/release-action@v1
@@ -68,4 +67,11 @@ jobs:
${{ steps.changelog.outputs.compareurl }}
- ${{ steps.changelog.outputs.changelog }}
\ No newline at end of file
+ ${{ steps.changelog.outputs.changelog }}
+
+
+ Document uiw@${{ steps.changelog.outputs.tag }}:
+ https://raw.githack.com/jaywcjlove/linux-command/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
+
+ - run: npm install @jsdevtools/npm-publish -g
+ - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
\ No newline at end of file
From 81d58b3c4046b224c2490b196641cf8e53672bf1 Mon Sep 17 00:00:00 2001
From: noodles2hg <57032282+z-anshun@users.noreply.github.com>
Date: Fri, 4 Mar 2022 00:30:02 +0800
Subject: [PATCH 018/566] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20ls=20=E5=91=BD?=
=?UTF-8?q?=E4=BB=A4=E9=94=99=E8=AF=AF=E7=A4=BA=E4=BE=8B=20(#337)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
应该为`ls *.jpg | xargs -n1 -I{} cp {} /data/images`
---
command/xargs.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/command/xargs.md b/command/xargs.md
index e511cf51891..9f5a2357f61 100644
--- a/command/xargs.md
+++ b/command/xargs.md
@@ -102,7 +102,7 @@ cat arg.txt | xargs -I {} ./sk.sh -p {} -l
复制所有图片文件到 /data/images 目录下:
```shell
-ls *.jpg | xargs -n1 -I cp {} /data/images
+ls *.jpg | xargs -n1 -I{} cp {} /data/images
```
#### 结合 find 命令使用
From 34e17422a275d669b2e21b8d4d7bb9082ffa6652 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sat, 5 Mar 2022 23:47:48 +0800
Subject: [PATCH 019/566] chore: update workflows config
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b6c4b8c673d..015bf8c024b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -70,7 +70,7 @@ jobs:
${{ steps.changelog.outputs.changelog }}
- Document uiw@${{ steps.changelog.outputs.tag }}:
+ Document linux-command@${{ steps.changelog.outputs.tag }}:
https://raw.githack.com/jaywcjlove/linux-command/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
- run: npm install @jsdevtools/npm-publish -g
From a5b5344b43532af5feedcd652b318b8b0b3e3456 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sat, 5 Mar 2022 23:48:02 +0800
Subject: [PATCH 020/566] released v1.8.3
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 400c37592e7..b2bf39deba5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "linux-command",
- "version": "1.8.2",
+ "version": "1.8.3",
"description": "Linux Command",
"homepage": "https://jaywcjlove.github.io/linux-command/",
"main": "dist/data.json",
From a775db6dd0eb36c53bdd5afe0873e1b559dfd8ef Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sat, 5 Mar 2022 23:53:51 +0800
Subject: [PATCH 021/566] chore: update devDependencies.
---
package.json | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/package.json b/package.json
index b2bf39deba5..6471d2fce2b 100644
--- a/package.json
+++ b/package.json
@@ -25,15 +25,15 @@
"url": "git+https://github.com/jaywcjlove/linux-command.git"
},
"devDependencies": {
- "archiver": "5.3.0",
- "colors-cli": "1.0.28",
- "ejs": "3.1.6",
- "fs-extra": "10.0.0",
- "markdown-to-html-cli": "3.2.5",
- "sitemap-generator": "8.5.1",
- "sqlite3": "5.0.2",
- "stylus": "0.55.0",
- "uglify-js": "3.14.4"
+ "archiver": "~5.3.0",
+ "colors-cli": "~1.0.28",
+ "ejs": "~3.1.6",
+ "fs-extra": "~10.0.1",
+ "markdown-to-html-cli": "~3.2.5",
+ "sitemap-generator": "~8.5.1",
+ "sqlite3": "~5.0.2",
+ "stylus": "~0.56.0",
+ "uglify-js": "~3.15.2"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
From 754727a96159a371e9444f74e831892b70276d2f Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sat, 5 Mar 2022 23:55:03 +0800
Subject: [PATCH 022/566] chore: update renovate.json
---
renovate.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/renovate.json b/renovate.json
index f45d8f110c3..5fe6b173781 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,5 +1,11 @@
{
"extends": [
"config:base"
+ ],
+ "packageRules": [
+ {
+ "matchPackagePatterns": ["*"],
+ "rangeStrategy": "replace"
+ }
]
}
From 0dce51630b96c382a79227caa4128f64116d61ca Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Thu, 10 Mar 2022 11:34:03 +0800
Subject: [PATCH 023/566] chore: update workflow config.
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 015bf8c024b..c9fa6b6b6a9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@
-name: GitHub Actions Build and Deploy linux-command
+name: CI
on:
push:
branches:
From 777dc5b18ff19a01f9a8ba055993b3e82c76d1bb Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Thu, 10 Mar 2022 11:34:45 +0800
Subject: [PATCH 024/566] chore: Update README.md (#341)
---
README.md | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index ed99420f2e1..e1ad1a9e812 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,11 @@
Linux Command
-[![Web](https://jaywcjlove.github.io/sb/ico/linux.svg)](https://jaywcjlove.github.io/linux-command/) [![weibo](https://jaywcjlove.github.io/sb/ico/weibo.svg)](http://weibo.com/pc175) [![Get this with npm](https://jaywcjlove.github.io/sb/ico/npm.svg)](https://www.npmjs.com/package/linux-command) [![NPM Download](https://img.shields.io/npm/dm/linux-command.svg?style=flat)](https://www.npmjs.com/package/linux-command)
+[![CI](https://github.com/jaywcjlove/linux-command/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/linux-command/actions/workflows/ci.yml)
+[![Web](https://jaywcjlove.github.io/sb/ico/linux.svg)](https://jaywcjlove.github.io/linux-command/)
+[![weibo](https://jaywcjlove.github.io/sb/ico/weibo.svg)](http://weibo.com/pc175)
+[![Get this with npm](https://jaywcjlove.github.io/sb/ico/npm.svg)](https://www.npmjs.com/package/linux-command)
+[![NPM Download](https://img.shields.io/npm/dm/linux-command.svg?style=flat)](https://www.npmjs.com/package/linux-command)
[![jsdelivr cdn](https://data.jsdelivr.com/v1/package/npm/linux-command/badge)](https://www.jsdelivr.com/package/npm/linux-command)
当前仓库搜集了 570 多个 Linux 命令,是一个非盈利性的仓库,生成了一个 web 网站方便使用,目前网站没有任何广告,内容包含 Linux 命令手册、详解、学习,内容来自网络和网友的补充,非常值得收藏的 Linux 命令速查手册。版权归属原作者,对任何法律问题及风险不承担任何责任,没有任何商业目的,如果认为侵犯了您的版权,请来信告知。我不能完全保证内容的正确性。通过使用本站内容带来的风险与我无关。当使用本站时,代表您已接受了本站的使用条款和隐私条款。
@@ -30,7 +34,7 @@
⚠️ 你们拿过去部署的静态网站,还是希望挂个 GitHub 地址,这样大家共同维护命令文档,让文档更加完善,更加丰富,当然你删除本站所有信息相关信息,其实我也不太在意,默认允许你们随意搞,我不负任何负责。如果您也部署了一份,可以将网址放到下面 :)。
-[`linux.devonline.net`](http://linux.devonline.net/),[`linux.ftqq.com`](https://linux.ftqq.com/),[`linux.gaomeluo.com`](https://linux.gaomeluo.com),[`atoolbox.net`](http://www.atoolbox.net/Tool.php?Id=826),[`xiaoshanseo.com`](https://tools.xiaoshanseo.com/Tools/linux-command/),[`262235.xyz`](https://262235.xyz/linux-command/),[`cmsblogs.cn`](https://linux.cmsblogs.cn/),[`loquy.cn`](https://www.loquy.cn/linux-command/),[`bqrdh.com`](https://tools.bqrdh.com/linux-command/),[`buyao.vip`](https://demo.buyao.vip/linux/),[`hezhiqiang.gitbook.io`](https://hezhiqiang.gitbook.io/linux/)
+[`linux.devonline.net`](http://linux.devonline.net/),[`linux.ftqq.com`](https://linux.ftqq.com/),[`linux.gaomeluo.com`](https://linux.gaomeluo.com),[`atoolbox.net`](http://www.atoolbox.net/Tool.php?Id=826),[`xiaoshanseo.com`](https://tools.xiaoshanseo.com/Tools/linux-command/),[`262235.xyz`](https://262235.xyz/linux-command/),[`cmsblogs.cn`](https://linux.cmsblogs.cn/),[`loquy.cn`](https://www.loquy.cn/linux-command/),[`bqrdh.com`](https://tools.bqrdh.com/linux-command/),[`buyao.vip`](https://demo.buyao.vip/linux/),[`hezhiqiang.gitbook.io`](https://hezhiqiang.gitbook.io/linux/),[`linux.mmoke.com`](https://linux.mmoke.com)
### 微信小程序版本
From 432b3abb4fa3e04fefa018afc5b87958fda8d21c Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Thu, 10 Mar 2022 11:39:30 +0800
Subject: [PATCH 025/566] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E7=99=BE?=
=?UTF-8?q?=E5=BA=A6=E7=BB=9F=E8=AE=A1=20(#341)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
template/partial/footer.ejs | 2 --
1 file changed, 2 deletions(-)
diff --git a/template/partial/footer.ejs b/template/partial/footer.ejs
index 8297e0a5f05..a8359a9ba4a 100644
--- a/template/partial/footer.ejs
+++ b/template/partial/footer.ejs
@@ -1,5 +1,3 @@
-