随笔分类 -  linux shell

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 77 下一页
摘要:001、 [root@pc1 test02]# ls a.txt test.sh [root@pc1 test02]# cat a.txt ## 测试序列 GATATATGCATATACTT [root@pc1 test02]# cat test.sh ## 计算程序 #!/bin/bash len 阅读全文
posted @ 2023-09-07 10:24 小鲨鱼2018 阅读(21) 评论(0) 推荐(0)
摘要:001、configure: error: libcurl library not found 002、解决方法 [root@pc1 test01]# yum -y install libcurl-devel 。 阅读全文
posted @ 2023-08-29 21:15 小鲨鱼2018 阅读(716) 评论(0) 推荐(0)
摘要:001、configure: error: liblzma development files not found 002、解决方法 [root@pc1 test01]# yum -y install xz-devel 。 阅读全文
posted @ 2023-08-29 21:10 小鲨鱼2018 阅读(375) 评论(0) 推荐(0)
摘要:001、configure: error: libbzip2 development files not found 002、解决方法 [root@pc1 test01]# yum -y install bzip2-devel 。 阅读全文
posted @ 2023-08-29 21:07 小鲨鱼2018 阅读(274) 评论(0) 推荐(0)
摘要:001、configure: error: zlib development files not found 002、解决方法: [root@pc1 test01]# yum -y install zlib-devel 。 阅读全文
posted @ 2023-08-29 21:04 小鲨鱼2018 阅读(164) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test02]# ls a.txt b.txt [root@PC1 test02]# cat a.txt ## 测试数据 77 jj jj ee ww [root@PC1 test02]# cat b.txt ## 测试数据 xx rr ee 88 ww [root@P 阅读全文
posted @ 2023-08-17 22:02 小鲨鱼2018 阅读(115) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test02]# ls a.txt b.txt [root@PC1 test02]# cat a.txt ## 测试文件 88 77 jj ff yy rr tt [root@PC1 test02]# cat b.txt ## 测试文件 uu rr tt uu 77 8 阅读全文
posted @ 2023-08-17 21:51 小鲨鱼2018 阅读(400) 评论(0) 推荐(0)
摘要:001、for循环 [root@PC1 test02]# ls a.txt [root@PC1 test02]# cat a.txt ## 测试数据 1 2 3 4 5 6 7 8 9 10 11 12 [root@PC1 test02]# awk '{sum = 0; for(i = 1; i < 阅读全文
posted @ 2023-08-17 18:08 小鲨鱼2018 阅读(265) 评论(0) 推荐(0)
摘要:001、FIELDWIDTHS 用于指定输出字段的宽度 [root@PC1 test02]# ls a.txt [root@PC1 test02]# cat a.txt ## 测试数据 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ [ro 阅读全文
posted @ 2023-08-17 17:42 小鲨鱼2018 阅读(99) 评论(0) 推荐(0)
摘要:001、NR [root@PC1 test02]# cat a.txt ## 测试文件 1 2 3 4 5 [root@PC1 test02]# cat b.txt ## 测试文件 11 12 13 14 15 [root@PC1 test02]# awk '{print NR, $0}' a.tx 阅读全文
posted @ 2023-08-17 17:05 小鲨鱼2018 阅读(172) 评论(0) 推荐(0)
摘要:输出is和not后面的单词 001、 [root@PC1 test01]# ls a.txt [root@PC1 test01]# cat a.txt ## 测试数据 this is wang ,not wan that is chen, not che this is chen ,and wang 阅读全文
posted @ 2023-08-07 15:17 小鲨鱼2018 阅读(528) 评论(0) 推荐(0)
摘要:以ntpd服务为例 001、查看ntpd服务的的当前状态 [root@PC1 home]# systemctl list-unit-files | grep "ntpd" ## 查看ntpd服务 ntpd.service disabled ntpdate.service disabled 002、设 阅读全文
posted @ 2023-08-04 21:54 小鲨鱼2018 阅读(496) 评论(0) 推荐(0)
摘要:001、查看ntp服务状态 [root@PC1 home]# cat /etc/redhat-release ## 系统版本 CentOS Linux release 7.6.1810 (Core) 002、启动ntp服务 [root@PC1 home]# systemctl start ntpd 阅读全文
posted @ 2023-08-04 21:42 小鲨鱼2018 阅读(617) 评论(0) 推荐(0)
摘要:001、-D选项用于限定只删除模式空间中的第一行 [root@PC1 test01]# ls data.txt [root@PC1 test01]# cat data.txt ## 测试数据 Header Line First Data Line End of Data Lines ## N选项将匹 阅读全文
posted @ 2023-08-01 09:41 小鲨鱼2018 阅读(411) 评论(0) 推荐(0)
摘要:001、-n(next),处理匹配行的下一行 [root@PC1 test01]# ls a.txt [root@PC1 test01]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 [root@PC1 test01] 阅读全文
posted @ 2023-08-01 09:22 小鲨鱼2018 阅读(643) 评论(0) 推荐(0)
摘要:001、查找当前目录下的隐藏文件 [root@PC1 test01]# ls a.txt dir1 [root@PC1 test01]# ls -a . .. a.txt dir1 .x.txt [root@PC1 test01]# find ./ -maxdepth 1 -type f -name 阅读全文
posted @ 2023-07-31 17:39 小鲨鱼2018 阅读(1171) 评论(0) 推荐(0)
摘要:-h:使用易读性数字,比如 K, G单位。 001、 [root@PC1 test02]# ls a.txt [root@PC1 test02]# cat a.txt ## 测试数据 2G 3K 4K 1G [root@PC1 test02]# sort a.txt 1G 2G 3K 4K [roo 阅读全文
posted @ 2023-07-25 16:19 小鲨鱼2018 阅读(182) 评论(0) 推荐(0)
摘要:sort:-g选项:按照通用数值排序,支持科学计数法 001、直接使用sort [root@PC1 test02]# ls a.txt [root@PC1 test02]# cat a.txt ## 测试数据 6.84017213908805e-10 6.27015779416403e-08 0.0 阅读全文
posted @ 2023-07-25 16:14 小鲨鱼2018 阅读(133) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test02]# ls a.txt index.txt [root@PC1 test02]# cat index.txt ## 索引文件 2 4 8 9 14 [root@PC1 test02]# cat a.txt ## 测试文件 001 002 003 004 00 阅读全文
posted @ 2023-07-25 11:54 小鲨鱼2018 阅读(73) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test04]# ls account adr [root@PC1 test04]# cat account ## 测试数据 张三|000001 李四|000002 [root@PC1 test04]# cat adr ## 测试数据 000001|10 000001| 阅读全文
posted @ 2023-07-25 11:45 小鲨鱼2018 阅读(118) 评论(0) 推荐(0)

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 77 下一页