随笔分类 -  linux shell

上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 77 下一页
摘要:001、 (base) root@PC1:/home/test2# ls ## 当前目录下三个文件夹 test1 test2 test3 (base) root@PC1:/home/test2# tree ## 使用tree命令查看 . ├── test1 │ ├── 1.txt │ ├── 2.t 阅读全文
posted @ 2022-08-11 15:48 小鲨鱼2018 阅读(1525) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 a b c e a d a d e a f j 3 j k r a d a a a a a a f f a e (bas 阅读全文
posted @ 2022-08-11 15:10 小鲨鱼2018 阅读(126) 评论(0) 推荐(0)
摘要:printf命令用于格式化输出 001、输出字符串 %s (base) root@PC1:/home/test2# printf "%s\n" abcde ## %s 输出字符串 abcde (base) root@PC1:/home/test2# printf "xxx--%s\n" abcde 阅读全文
posted @ 2022-08-11 14:26 小鲨鱼2018 阅读(1311) 评论(0) 推荐(0)
摘要:cmp命令用于判断两个文件是否相同 001、 (base) root@PC1:/home/test2# ls (base) root@PC1:/home/test2# seq 5 > a.txt; seq 3 > b.txt; seq 5 > c.txt ## 3个测试文件 (base) root@ 阅读全文
posted @ 2022-08-11 14:10 小鲨鱼2018 阅读(355) 评论(0) 推荐(0)
摘要:001、 [ -a FILE ] 如果 FILE 存在则为真。 [ -b FILE ] 如果 FILE 存在且是一个块特殊文件则为真。 [ -c FILE ] 如果 FILE 存在且是一个字特殊文件则为真。 [ -d FILE ] 如果 FILE 存在且是一个目录则为真。 [ -e FILE ] 如 阅读全文
posted @ 2022-08-11 13:51 小鲨鱼2018 阅读(370) 评论(0) 推荐(0)
摘要:-s选项; 01、文件不存在; 为假 02、文件存在,但是大小为空; 为假 03、文件存在,且大小不为空; 为真 001、 [ -s file ]:文件存在且不为0是为真。 (base) root@PC1:/home/test2# ls a.txt b.txt (base) root@PC1:/ho 阅读全文
posted @ 2022-08-11 13:46 小鲨鱼2018 阅读(1022) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt 1 2 8 10 (base) root@PC1:/home/test2# cat -s a.txt ## 将多个连续的空行压缩为一个空 阅读全文
posted @ 2022-08-11 13:35 小鲨鱼2018 阅读(62) 评论(0) 推荐(0)
摘要:001、 = 判断字符串是否相同 (base) root@PC1:/home/test2# a=abcd (base) root@PC1:/home/test2# b=opqr (base) root@PC1:/home/test2# c=abcd ## 测试字符串 (base) root@PC1: 阅读全文
posted @ 2022-08-11 13:25 小鲨鱼2018 阅读(599) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCCGTT 阅读全文
posted @ 2022-08-10 01:24 小鲨鱼2018 阅读(196) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCCGTT 阅读全文
posted @ 2022-08-10 01:21 小鲨鱼2018 阅读(266) 评论(0) 推荐(0)
摘要:001、 (base) root@ubuntu01pc1:~# conda --version ## conda版本 conda 4.12.0 002、在终端执行如何命令 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn 阅读全文
posted @ 2022-08-08 21:03 小鲨鱼2018 阅读(1394) 评论(0) 推荐(0)
摘要:001、 回退:u 前进:ctrl + r 阅读全文
posted @ 2022-08-08 19:18 小鲨鱼2018 阅读(475) 评论(0) 推荐(0)
摘要:001、 liujiaxin01@ubuntu01pc1:~/Desktop$ whoami liujiaxin01 liujiaxin01@ubuntu01pc1:~/Desktop$ sudo passwd root ## 创建root账户 [sudo] password for liujiax 阅读全文
posted @ 2022-08-08 01:07 小鲨鱼2018 阅读(1696) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# shasum a.txt 8b945928bcfa1a6018f3e65d83ad27c6879bd6c8 a.txt [root@PC1 test4]# shasum --algorithm 256 阅读全文
posted @ 2022-08-07 23:50 小鲨鱼2018 阅读(798) 评论(0) 推荐(0)
摘要:001、 ctrl + a:回到行首 ctrl + e:回到行末 ctrl + u:剪切行首到光标处的位置 ctrl + k:剪切光标所在位置到末尾的内容 ctrl + y:粘贴最近剪切的内容 阅读全文
posted @ 2022-08-05 00:33 小鲨鱼2018 阅读(199) 评论(0) 推荐(0)
摘要:001、shell实现 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt 3 a 8 a y a a a f y a a a a a e a a a r k root@PC1:/home/test2# awk ' 阅读全文
posted @ 2022-08-03 15:33 小鲨鱼2018 阅读(193) 评论(0) 推荐(0)
摘要:001、shell实现 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt ## 测试数据, 删除第一次匹配xpehh以外的所有匹配xpehh的行 01 ee ff 02 ee de 03 dd ee 04 jj 阅读全文
posted @ 2022-08-03 05:56 小鲨鱼2018 阅读(184) 评论(0) 推荐(0)
摘要:001、 root@PC1:/home/test2# ls test.map root@PC1:/home/test2# cat test.map ## 用一个map文件进行测试,按照染色体打乱顺序 6 snp16 0 312984 1 snp2 0 85204 5 snp15 0 204629 6 阅读全文
posted @ 2022-08-03 00:45 小鲨鱼2018 阅读(408) 评论(0) 推荐(0)
摘要:001、压缩保留源文件 root@PC1:/home/test2# ls outcome.map root@PC1:/home/test2# gzip -c outcome.map > new.map.gz ## 压缩为gz文件,并保留源文件 root@PC1:/home/test2# ls new 阅读全文
posted @ 2022-08-03 00:20 小鲨鱼2018 阅读(733) 评论(0) 推荐(0)
摘要:001、 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt aa dd ss dd ff xv ef 33 cc xx ee ww df ff zc xx xx ff er ed ww xx xx ee er uy vv r 阅读全文
posted @ 2022-08-02 23:21 小鲨鱼2018 阅读(684) 评论(0) 推荐(0)

上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 77 下一页