上一页 1 2 3 4 5 6 7 8 9 10 ··· 22 下一页
摘要: Linux version 5.4.0-80-generic (buildd@lcy01-amd64-028) linux内核版本号 gcc version 7.5.0 gcc编译器版本号 Ubuntu 7.5.0-3ubuntu1~18.04) Ubuntu版本号 阅读全文
posted @ 2021-08-01 21:52 zxy_ang 阅读(127) 评论(0) 推荐(0)
摘要: ctrl+b/ctrl f 光标左/右 AWK: man awk 一、内置变量: print 打印;$0 全部:awk '{print $0}' student2.txt $2 第二列(例:某些列不规则时):awk '{print $2}' student2.txt NF 每行有多少列:awk '{ 阅读全文
posted @ 2021-07-31 10:53 zxy_ang 阅读(51) 评论(0) 推荐(0)
摘要: 一、是否为正整数 echo "11" | egrep "^([0-9]|[1-9][0-9]+)$" 11 二、查看Linux版本 cat /etc/os-release 阅读全文
posted @ 2021-07-28 23:36 zxy_ang 阅读(14) 评论(0) 推荐(0)
摘要: getopt:待整 阅读全文
posted @ 2021-07-25 22:57 zxy_ang 阅读(22) 评论(0) 推荐(0)
摘要: 参考:https://www.runoob.com/linux/linux-comm-crontab.html service crond start 开启服务 service crond stop 关闭服务 service crond restart 重启服务 service crond relo 阅读全文
posted @ 2021-07-24 22:55 zxy_ang 阅读(25) 评论(0) 推荐(0)
摘要: 先复制修改内容:\cp /etc/passwd passwd_cp -n 打印匹配的行(p:打印):sed -n 'p' /etc/passwd -i 直接修改文件:sed -ri '/9{3}/ a xxx xxx' passwd_cp(-a:之后添加) -r 拓展正则:sed -nr '/0{3 阅读全文
posted @ 2021-07-19 23:23 zxy_ang 阅读(106) 评论(0) 推荐(0)
摘要: grep/find: grep对文件的内容,会对文件的每一行进行过滤匹配查找。 find是对文件的属性,如文件名,文件大小等。 find 路径 -name '1.txt' find . -name '*.sh' find "测试字段" 1.txt | grep wc -l grep:grep roo 阅读全文
posted @ 2021-07-18 22:50 zxy_ang 阅读(142) 评论(0) 推荐(0)
摘要: cat while_ip.txtserver1 114.114.114.114server2 192.168.1.1server2 www.baidu.com cat while_ip.sh #! /bin/bash while read hostname ip; do ping c1 W1 "${ 阅读全文
posted @ 2021-07-17 23:48 zxy_ang 阅读(22) 评论(0) 推荐(0)
摘要: 添加用户:useradd yang04 设置密码:passwd "yang04:123" | chpasswd 提示修改密码:passwd -e yang04 小练习1 #!/bin/bash for (( i=1; i<=10; i++ )); do echo "${i}"done 小练习2 创建 阅读全文
posted @ 2021-07-17 18:13 zxy_ang 阅读(27) 评论(0) 推荐(0)
摘要: vim的配置文件为 /etc/vimrc,不要直接修改这个文件,在用户根目录下建隐藏文件:vim ~/.vimrc set showmode nohlsearchset autoindent tabstop=4set expandtabsyntax on abbr sh #!/bin/bash 阅读全文
posted @ 2021-07-17 10:56 zxy_ang 阅读(61) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 22 下一页