随笔分类 - linux shell
摘要:001、 a、总变量传入 [root@PC1 test1]# ls ## 测试文件及目录 a.txt b.txt c.csv test [root@PC1 test1]# tree ## 查看目录结构 . ├── a.txt ├── b.txt ├── c.csv └── test 1 direct
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt b.txt c.txt x.ped y.ped z.ped [root@PC1 test]# du -sh * ## 显示每个文件的大小 30M a.txt 60M b.txt 200M c.txt 20M x.ped 100M y.pe
阅读全文
摘要:001、 Linux 中awk命令批量提取多个非连续的行 [root@PC1 test]# ls a.txt lines.list [root@PC1 test]# cat a.txt ## 测试文件 eree fff 1 saaf eee 2 xxxe kkk 3 zzzz mmm 4 2222
阅读全文
摘要:Linux 中 如何将文本中最后一个指定的字符串替换为指定的内容
阅读全文
摘要:001、纯数字 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 sdf324 7fy323td34 342 fff 435 tih 6334 s234dfg65 [root@PC1 test1]# grep "^[0-9]
阅读全文
摘要:001、linux 中 awk命令输出文本的前几列 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试文本 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 2
阅读全文
摘要:001、linux 中如何输出文本的最后几列 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试文本 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 2
阅读全文
摘要:1、rev + sed实现 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 edab34aberabr dfjhdsfffgggd abdfabdfereab dfabereabfabe [root@PC1 test1]#
阅读全文
摘要:fastq-dump --split-files 和 fastq-dump --split-3 的区别和联系
阅读全文
摘要:001、find命令仅仅列出文件,不包括目录 a、 [root@PC1 test1]# ls ## 测试目录 dir001 dir002 dir003 file1.map file1.txt file2.map file2.txt [root@PC1 test1]# find -type f ##
阅读全文
摘要:001、awk输出最后的两个字符 a、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试数据 325dsfd3248 fdsfgeiuyeer sfdgdgherc [root@PC1 test1]# awk -F "" '{p
阅读全文
摘要:1、tr实现 a、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 ab cd EF Gh ij KL [root@PC1 test1]# cat a.txt | tr "A-Z" "a-z" ## 全部转换为小写 ab
阅读全文
摘要:001、一般去重复 [root@PC1 test01]# ls a.txt [root@PC1 test01]# cat a.txt ## 测试文本 c d c a b b [root@PC1 test01]# cat a.txt | sort | uniq ## 去重复后也排序了 a b c d
阅读全文
摘要:Linux 中如何给指定的目录或者文件设置访问密码
阅读全文
摘要:linux 中实现文本一列按照指定列数输出
阅读全文
摘要:001、删除奇数行 a、sed实现 [root@PC1 test01]# ls a.txt [root@PC1 test01]# cat a.txt ## 测试数据 1 01 02 2 03 04 3 05 06 4 07 08 5 09 10 6 11 12 7 13 14 8 15 16 9 1
阅读全文
摘要:linux 中实现统计管道符导入所有文件总的大小。
阅读全文
摘要:001、正常输出文件信息 [root@PC1 test1]# ls ## 测试文件 a.txt b.csv b.ped b.txt [root@PC1 test1]# ls -lh ## 正常输出文件信息 total 190M -rw-r--r--. 1 root root 20M Feb 9 09
阅读全文

浙公网安备 33010602011771号