上一页 1 ··· 363 364 365 366 367 368 369 370 371 ··· 407 下一页
摘要: 1、查看系统版本 [root@centos7PC1 home]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4. 阅读全文
posted @ 2021-01-30 16:16 小鲨鱼2018 阅读(820) 评论(0) 推荐(0)
摘要: 1、 [root@PC3 test]# uname -a Linux PC3 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux 2、 [root@PC3 test]# cat 阅读全文
posted @ 2021-01-30 14:58 小鲨鱼2018 阅读(451) 评论(0) 推荐(0)
摘要: 1、awk命令 [root@PC3 test]# cat a.txt dfs dsafd d fgasdf safd ge [root@PC3 test]# awk -F "" '{print NF}' a.txt 3 5 1 6 4 2 2、 [root@PC3 test]# cat a.txt 阅读全文
posted @ 2021-01-30 11:57 小鲨鱼2018 阅读(7256) 评论(0) 推荐(0)
摘要: 1、 [root@PC3 sheep]# ls a.ped result.map result.ped tr.map [root@PC3 sheep]# ls -S | xargs -n 1 du -sh ## 从大致小进行排序 829M result.ped 204M a.ped 20M resu 阅读全文
posted @ 2021-01-30 11:45 小鲨鱼2018 阅读(320) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@PC3 test]# cat a.txt 34 rtd 78 98 fgg 345 23 fgg 668 45 dfs 23 10 fsd 35 77 jla 35 87 saf 45 53 sfg 2334 46 wrt 098 2、awk命令显示特定列 [root@PC 阅读全文
posted @ 2021-01-29 22:34 小鲨鱼2018 阅读(353) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@PC3 test]# cat a.txt 1 e abc 2 f a 3 x g 4 w p 5 q k 6 w f 7 x F 8 m y 9 c t 2、匹配特定字符串 [root@PC3 test]# cat a.txt 1 e abc 2 f a 3 x g 4 w 阅读全文
posted @ 2021-01-29 20:45 小鲨鱼2018 阅读(457) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@PC3 test]# cat a.txt 1234567849 1234567849 1234567849 1234567849 2、删除前几个字符 [root@PC3 test]# sed 's/..//' a.txt ## 删除前两个字符 34567849 345678 阅读全文
posted @ 2021-01-29 20:03 小鲨鱼2018 阅读(21133) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@PC3 test]# cat a.txt Beijing 2003 Beijing 2004 Beijing 2005 Beijing 2006 Beijing 2005 Beijing 2008 [root@PC3 test]# cat c.txt 1 2 3 4 5 6 阅读全文
posted @ 2021-01-29 13:51 小鲨鱼2018 阅读(632) 评论(0) 推荐(0)
摘要: 1、 [root@PC3 test]# cat c.txt 1 2 3 4 5 6 7 8 9 10 2、将2替换为xxxx,将5替换为yyyy,将7替换为zzz,删除匹配9的行,在第一行前增加first [root@PC3 test]# sed 's/2/xxxx/; s/5/yyyy/; s/7 阅读全文
posted @ 2021-01-29 13:41 小鲨鱼2018 阅读(164) 评论(0) 推荐(1)
摘要: 1、测试数据 [root@PC3 test]# cat c.txt 1 2 3 4 5 6 7 8 9 10 2、提取包含2的行,其后1行,其后2行 [root@PC3 test]# sed -n '/2/p' c.txt 2 [root@PC3 test]# sed -n '/2/,+1p' c. 阅读全文
posted @ 2021-01-29 13:31 小鲨鱼2018 阅读(3854) 评论(0) 推荐(0)
上一页 1 ··· 363 364 365 366 367 368 369 370 371 ··· 407 下一页