首页 > 其他 > 详细

awk查看分区使用情况与查看IP地址

时间:2021-02-05 01:03:36      阅读:28      评论:0      收藏:0      [点我收藏+]
[root@master ~]# df -h
文件系统                 容量  已用  可用 已用% 挂载点
/dev/mapper/centos-root   19G  2.2G   17G   12% /
devtmpfs                 898M     0  898M    0% /dev
tmpfs                    910M     0  910M    0% /dev/shm
tmpfs                    910M  9.5M  901M    2% /run
tmpfs                    910M     0  910M    0% /sys/fs/cgroup
/dev/sda1                197M  124M   74M   63% /boot
tmpfs                    182M     0  182M    0% /run/user/0
[root@master ~]# df -h |awk NR >1 && /\/$/{print $5}|cut -d% -f1
12
[root@master ~]# df -h |awk NR >1 && /boot$/{print $5}|cut -d% -f1
63
[root@master ~]# ifconfig |awk /inet / && $2!~/127./{print $2}
192.168.1.220
[root@master ~]# ifconfig |awk BEGIN{RS=""} !/lo/{print $6}
192.168.1.220

 

awk查看分区使用情况与查看IP地址

原文:https://www.cnblogs.com/liujunjun/p/14375480.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!