forked from jaywcjlove/linux-command
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fee9124
commit e571886
Showing
41 changed files
with
1,815 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
as | ||
=== | ||
|
||
汇编语言编译器 | ||
|
||
## 补充说明 | ||
|
||
**as命令** GNU组织推出的一款汇编语言编译器,它支持多种不同类型的处理器。 | ||
|
||
### 语法 | ||
|
||
``` | ||
as(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-ac:忽略失败条件; | ||
-ad:忽略调试指令; | ||
-ah:包括高级源; | ||
-al:包括装配; | ||
-am:包括宏扩展; | ||
-an:忽略形式处理; | ||
-as:包括符号; | ||
=file:设置列出文件的名字; | ||
--alternate:以交互宏模式开始; | ||
-f:跳过空白和注释预处理; | ||
-g:产生调试信息; | ||
-J:对于有符号溢出不显示警告信息; | ||
-L:在符号表中保留本地符号; | ||
-o:指定要生成的目标文件; | ||
--statistics:打印汇编所用的最大空间和总时间。 | ||
``` | ||
|
||
### 参数 | ||
|
||
汇编文件:指定要汇编的源文件。 | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
bc | ||
=== | ||
|
||
算术操作精密运算工具 | ||
|
||
## 补充说明 | ||
|
||
**bc命令** 是一种支持任意精度的交互执行的计算器语言。bash内置了对整数四则运算的支持,但是并不支持浮点运算,而bc命令可以很方便的进行浮点运算,当然整数运算也不再话下。 | ||
|
||
### 语法 | ||
|
||
``` | ||
bc(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-i:强制进入交互式模式; | ||
-l:定义使用的标准数学库; | ||
-w:对POSIX bc的扩展给出警告信息; | ||
-q:不打印正常的GNU bc环境信息; | ||
-v:显示指令版本信息; | ||
-h:显示指令的帮助信息。 | ||
``` | ||
|
||
### 参数 | ||
|
||
文件:指定包含计算任务的文件。 | ||
|
||
### 实例 | ||
|
||
算术操作高级运算bc命令它可以执行浮点运算和一些高级函数: | ||
|
||
``` | ||
echo "1.212*3" | bc | ||
3.636 | ||
``` | ||
|
||
设定小数精度(数值范围) | ||
|
||
``` | ||
echo "scale=2;3/8" | bc | ||
0.37 | ||
``` | ||
|
||
参数`scale=2`是将bc输出结果的小数位设置为2位。 | ||
|
||
进制转换 | ||
|
||
``` | ||
#!/bin/bash | ||
abc=192 | ||
echo "obase=2;$abc" | bc | ||
``` | ||
|
||
执行结果为:11000000,这是用bc将十进制转换成二进制。 | ||
|
||
``` | ||
#!/bin/bash | ||
abc=11000000 | ||
echo "obase=10;ibase=2;$abc" | bc | ||
``` | ||
|
||
执行结果为:192,这是用bc将二进制转换为十进制。 | ||
|
||
计算平方和平方根: | ||
|
||
``` | ||
echo "10^10" | bc | ||
echo "sqrt(100)" | bc | ||
``` | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
cal | ||
=== | ||
|
||
显示当前日历或指定日期的日历 | ||
|
||
## 补充说明 | ||
|
||
**cal命令** 用于显示当前日历,或者指定日期的日历。 | ||
|
||
### 语法 | ||
|
||
``` | ||
cal(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-l:显示单月输出; | ||
-3:显示临近三个月的日历; | ||
-s:将星期日作为月的第一天; | ||
-m:将星期一作为月的第一天; | ||
-j:显示“julian”日期; | ||
-y:显示当前年的日历。 | ||
``` | ||
|
||
### 参数 | ||
|
||
``` | ||
月:指定月份; | ||
年:指定年份。 | ||
``` | ||
|
||
### 实例 | ||
|
||
单独执行cal命令会打印出日历: | ||
|
||
``` | ||
[root@localhost ~]# cal | ||
十二月 2013 | ||
日 一 二 三 四 五 六 | ||
1 2 3 4 5 6 7 | ||
8 9 10 11 12 13 14 | ||
15 16 17 18 19 20 21 | ||
22 23 24 25 26 27 28 | ||
29 30 31 | ||
``` | ||
|
||
``` | ||
[root@localhost ~]# cal -j | ||
十二月 2013 | ||
日 一 二 三 四 五 六 | ||
335 336 337 338 339 340 341 | ||
342 343 344 345 346 347 348 | ||
349 350 351 352 353 354 355 | ||
356 357 358 359 360 361 362 | ||
363 364 365 | ||
``` | ||
|
||
``` | ||
[root@localhost ~]# cal -3 | ||
十一月 2013 十二月 2013 一月 2014 | ||
日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六 | ||
1 2 1 2 3 4 5 6 7 1 2 3 4 | ||
3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 | ||
10 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 18 | ||
17 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 25 | ||
24 25 26 27 28 29 30 29 30 31 26 27 28 29 30 31 | ||
``` | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
cancel | ||
=== | ||
|
||
取消已存在的打印任务 | ||
|
||
## 补充说明 | ||
|
||
**cancel命令** 用于取消已存在的打印任务。 | ||
|
||
### 语法 | ||
|
||
``` | ||
cancel(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-a:取消所有打印任务; | ||
-E:当连接到服务器时强制使用加密; | ||
-U:指定连接服务器时使用的用户名; | ||
-u:指定打印任务所属的用户; | ||
-h:指定连接的服务器名和端口号。 | ||
``` | ||
|
||
### 参数 | ||
|
||
打印任务号:指定要取消的打印任务编号。 | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
clear | ||
=== | ||
|
||
清除当前屏幕终端上的任何信息 | ||
|
||
## 补充说明 | ||
|
||
**clear命令** 用于清除当前屏幕终端上的任何信息。 | ||
|
||
### 语法 | ||
|
||
``` | ||
clear | ||
``` | ||
|
||
### 实例 | ||
|
||
直接输入clear命令当前终端上的任何信息就可被清除。 | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
consoletype | ||
=== | ||
|
||
输出已连接的终端类型 | ||
|
||
## 补充说明 | ||
|
||
**consoletype命令** 用于打印已连接的终端类型到标准输出,并能够检查已连接的终端是当前终端还是虚拟终端。 | ||
|
||
### 语法 | ||
|
||
``` | ||
consoletype | ||
``` | ||
|
||
### 实例 | ||
|
||
``` | ||
[root@localhost ~]# consoletype | ||
pty | ||
``` | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
cupsdisable | ||
=== | ||
|
||
停止指定的打印机 | ||
|
||
## 补充说明 | ||
|
||
**cupsdisable命令** 用于停止指定的打印机。 | ||
|
||
### 语法 | ||
|
||
``` | ||
cupsdisable(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-E:当连接到服务器时强制使用加密; | ||
-U:指定连接服务器时使用的用户名; | ||
-u:指定打印任务所属的用户; | ||
-c:取消指定打印机的所有打印任务; | ||
-h:指定连接的服务器名和端口号; | ||
-r:停止打印机的原因。 | ||
``` | ||
|
||
### 参数 | ||
|
||
目标:指定目标打印机。 | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
dpkg-deb | ||
=== | ||
|
||
Debian Linux下的软件包管理工具 | ||
|
||
## 补充说明 | ||
|
||
**dpkg-deb命令** 是Debian Linux下的软件包管理工具,它可以对软件包执行打包和解包操作以及提供软件包信息。 | ||
|
||
### 语法 | ||
|
||
``` | ||
dpkg-deb(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-c:显示软件包中的文件列表; | ||
-e:将主控信息解压; | ||
-f:把字段内容打印到标准输出; | ||
-x:将软件包中的文件释放到指定目录下; | ||
-X:将软件包中的文件释放到指定目录下,并显示释放文件的详细过程; | ||
-w:显示软件包的信息; | ||
-l:显示软件包的详细信息; | ||
-R:提取控制信息和存档的清单文件; | ||
-b:创建debian软件包。 | ||
``` | ||
|
||
### 参数 | ||
|
||
文件:指定要操作的“.deb”软件包的全名或软件名。 | ||
|
||
### 实例 | ||
|
||
解压程序文件: | ||
|
||
``` | ||
dpkg-deb -x drcom-pum_1.0-0ubuntu1~ppa1~jaunty1_i386.deb drcom | ||
``` | ||
|
||
解压控制文件: | ||
|
||
``` | ||
dpkg-deb -e drcom-pum_1.0-0ubuntu1~ppa1~jaunty1_i386.deb drcom/DEBIAN | ||
``` | ||
|
||
打包生成deb文件: | ||
|
||
``` | ||
dpkg-deb -b drcom drcom_1.4.8.2_i386.deb | ||
``` | ||
|
||
查询deb包中的文件内容: | ||
|
||
``` | ||
dpkg-deb -c demo.deb | ||
``` | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
Oops, something went wrong.