[root@zabbix-server ~]# free
total used free shared buff/cache available
Mem: 995896 532348 72036 12052 391512 263968
Swap: 2097148 1288 2095860
[root@zabbix-server ~]# free | awk '{print $7}'
263700
#打印每行最后一列
[root@zabbix-server ~]# free | awk '{print $NF}'
available
263640
2095860
[root@zabbix-server ~]# free | grep Mem
Mem: 995896 532580 71656 12056 391660 263732
[root@zabbix-server ~]# free | awk '/Mem/{print $NF}'
263660
[root@zabbix-server ~]# free | awk '/Mem/{print $NF}'
263668
[root@zabbix-server ~]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/mapper/centos-root 17811456 5575636 12235820 32% /
devtmpfs 480836 0 480836 0% /dev
tmpfs 497948 0 497948 0% /dev/shm
tmpfs 497948 8412 489536 2% /run
tmpfs 497948 0 497948 0% /sys/fs/cgroup
/dev/sda1 1038336 169540 868796 17% /boot
tmpfs 99592 12 99580 1% /run/user/42
tmpfs 99592 0 99592 0% /run/user/0
[root@zabbix-server ~]# df | grep "/$"
/dev/mapper/centos-root 17811456 5575636 12235820 32% /
[root@zabbix-server ~]# df | grep "/$" | awk 'print $6'
awk: cmd. line:1: print $6
awk: cmd. line:1: ^ syntax error
[root@zabbix-server ~]# df | grep "/$" | awk '{print $6}'
/
[root@zabbix-server ~]# df | grep "/$" | awk '{print $4}'
12236324
#临时切换英文语言
[root@zabbix-server ~]# LANG=C lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 142
Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping: 10
CPU MHz: 1799.999
BogoMIPS: 3599.99
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat spec_ctrl intel_stibp arch_capabilities
[root@zabbix-server ~]# LANG=C lscpu | grep "Model name" | awk -F: '{print $2}'
Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
[root@zabbix-server ~]# LANG=C lscpu | grep "^CPU(s)" | awk -F: '{print $2}'
1
[root@zabbix-server ~]# uptime
10:35:02 up 42 min, 1 user, load average: 0.02, 0.04, 0.05
[root@zabbix-server ~]# ifconfig ens32
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.50 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::6fc0:6e3a:cb75:56d2 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:40:d0:39 txqueuelen 1000 (Ethernet)
RX packets 3248 bytes 346012 (337.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2080 bytes 246535 (240.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@zabbix-server ~]# ifconfig ens32 | grep "RX p" | awk '{print"进站流量:" $5"字节"}'
进站流量:349360字节
[root@zabbix-server ~]# ifconfig ens32 | grep "TX p" | awk '{print"出站流量:" $5"字节"}'
出站流量:255097字节
[root@zabbix-server ~]# ifconfig ens32 | awk '/RX p/{print"出站流量:" $5"字节"}'
出站流量:384218字节
[root@zabbix-server ~]# ifconfig ens32 | awk '/TX p/{print"出站流量:" $5"字节"}'
出站流量:276949字节
[root@zabbix-server ~]# ssh 192.168.0.50
The authenticity of host '192.168.0.50 (192.168.0.50)' can't be established.
ECDSA key fingerprint is SHA256:9eA1rMtj1s0boZzi69n9W6DZnMRQm2IgEUu0j7A088g.
ECDSA key fingerprint is MD5:c3:25:aa:32:23:1f:a3:76:10:1e:8b:52:22:c9:6b:87.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.50' (ECDSA) to the list of known hosts.
root@192.168.0.50's password:
Permission denied, please try again.
root@192.168.0.50's password:
Permission denied, please try again.
root@192.168.0.50's password:
^C
[root@zabbix-server ~]# grep "Failed" /var/log/secure
Dec 12 10:54:18 zabbix-server sshd[9475]: Failed password for root from 192.168.0.50 port 48274 ssh2
Dec 12 10:54:24 zabbix-server sshd[9475]: Failed password for root from 192.168.0.50 port 48274 ssh2
Dec 12 10:54:27 zabbix-server sshd[9475]: Failed password for root from 192.168.0.50 port 48274 ssh2
[root@zabbix-server ~]# grep "Failed" /var/log/secure | awk '{print $11}'
192.168.0.50
192.168.0.50
192.168.0.50