随笔分类 -  linux

摘要:情况: yum search net-tools.x86_64 没有找到结果 解决: 1、yum search net-tools 2、 yum install -y net-tools.x86_64 安装成功! 阅读全文
posted @ 2019-10-23 11:43 朤尧 阅读(2369) 评论(0) 推荐(0)
摘要:问题情况: 1、虚机centos8 修改为静态ip后,由于网卡网段变更,无法上网 2、最小化安装,没有ifconfig 3、firewalld,selinux关闭 4、ping 不通物理机 根本原因: 静态路由配置错误 解决方案: 1、linux命令==> ip:ip addr 查看网络配置 nmc 阅读全文
posted @ 2019-10-23 11:24 朤尧 阅读(86100) 评论(2) 推荐(4)
摘要:AWK 1.begin end使用 cat /tmp/passwd |awk -F ':' 'BEGIN {print "hello"} {print $1"\t"$3} END {print "ending"}' 2.匹配 [root@zeus tmp]# cat /tmp/passwd |awk 阅读全文
posted @ 2019-06-21 09:45 朤尧 阅读(498) 评论(0) 推荐(0)
摘要:sed 列出5-7行 [root@www ~]# nl /etc/passwd | sed -n '5,7p' -n不在处理前打印,搜索root,/p打印 nl /etc/passwd | sed '/root/p' 举例:(假设我们有一文件名为ab) 删除某行 [root@localhost ru 阅读全文
posted @ 2019-06-21 09:43 朤尧 阅读(381) 评论(0) 推荐(0)