3.编写脚本 disk.sh,显示当前硬盘分区中空间利用率最大的值
[root@rocky8 ~]# cat disk.sh
#!/bin/bash
#
#**********************************************************************************************
#Author: Raymond
#QQ: 88563128
#Date: 2021-10-09
#FileName: disk.sh
#URL: raymond.blog.csdn.net
#Description: The test script
#Copyright (C): 2021 All rights reserved
#*********************************************************************************************
df |grep "/dev/sda*" |grep -o '[0-9]\{1,3\}%'|sort -nr |head -1
4.编写脚本links.sh,显示正连接本主机的每个远程主机的IPv4地址和连接数,并按连接数从大到小排序
[root@rocky8 ~]# cat link.sh
#!/bin/bash
#
#*********************************************************************************************
#Author: Raymond
#QQ: 88563128
#Date: 2021-10-09
#FileName: link.sh
#URL: raymond.blog.csdn.net
#Description: The test script
#Copyright (C): 2021 All rights reserved
#*********************************************************************************************
last | grep '^root' | tr -s " "|cut -d " " -f3 |sort|uniq -c
1421

被折叠的 条评论
为什么被折叠?



