随笔分类 - linux shell
摘要: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
阅读全文
摘要:001、configure: error: libcurl library not found 002、解决方法 [root@pc1 test01]# yum -y install libcurl-devel 。
阅读全文
摘要:001、configure: error: liblzma development files not found 002、解决方法 [root@pc1 test01]# yum -y install xz-devel 。
阅读全文
摘要:001、configure: error: libbzip2 development files not found 002、解决方法 [root@pc1 test01]# yum -y install bzip2-devel 。
阅读全文
摘要:001、configure: error: zlib development files not found 002、解决方法: [root@pc1 test01]# yum -y install zlib-devel 。
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 <
阅读全文
摘要:001、FIELDWIDTHS 用于指定输出字段的宽度 [root@PC1 test02]# ls a.txt [root@PC1 test02]# cat a.txt ## 测试数据 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ [ro
阅读全文
摘要: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
阅读全文
摘要:输出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
阅读全文
摘要:以ntpd服务为例 001、查看ntpd服务的的当前状态 [root@PC1 home]# systemctl list-unit-files | grep "ntpd" ## 查看ntpd服务 ntpd.service disabled ntpdate.service disabled 002、设
阅读全文
摘要:001、查看ntp服务状态 [root@PC1 home]# cat /etc/redhat-release ## 系统版本 CentOS Linux release 7.6.1810 (Core) 002、启动ntp服务 [root@PC1 home]# systemctl start ntpd
阅读全文
摘要:001、-D选项用于限定只删除模式空间中的第一行 [root@PC1 test01]# ls data.txt [root@PC1 test01]# cat data.txt ## 测试数据 Header Line First Data Line End of Data Lines ## N选项将匹
阅读全文
摘要: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]
阅读全文
摘要: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
阅读全文
摘要:-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
阅读全文
摘要:sort:-g选项:按照通用数值排序,支持科学计数法 001、直接使用sort [root@PC1 test02]# ls a.txt [root@PC1 test02]# cat a.txt ## 测试数据 6.84017213908805e-10 6.27015779416403e-08 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
阅读全文
摘要:001、 [root@PC1 test04]# ls account adr [root@PC1 test04]# cat account ## 测试数据 张三|000001 李四|000002 [root@PC1 test04]# cat adr ## 测试数据 000001|10 000001|
阅读全文

浙公网安备 33010602011771号