一,两台PC直连ping测抓包流程 编辑 关于ARP协议的状况,由于PC1不知道PC2 的mac地址,所以PC1第一次传输时进行了一次广播,像所有PC端询问位于 1.1.1.3的PC2 所在的mac地址,PC2收到信息后进行恢复 告知位于 1.1.1.1 的PC1 自己的mac地址,由此PC1与PC2才进行了数据交流。 编辑
001、查看一下当前系统 [root@PC1 home]# hostnamectl Static hostname: PC1 Icon name: computer Chassis: n/a Machine ID: 8f7f58c7ef6f42489c3251e9f474be72 Boot ID: e43741739e584fb4930cf608e15aed74 Virtualization: v
001、 root@PC1:/home/test3# ls root@PC1:/home/test3# seq 1000 > a.txt ## 生成一个测试文件 root@PC1:/home/test3# ls a.txt root@PC1:/home/test3# sha1sum a.txt ## 使用sha1sum命令生成sha1码 234e7e9c9c8490946d3e8c2a01bff41e9acce2
001、在本地创建共享目录, 比如在D盘创建一个share目录: 002、打开vmware及虚拟机; 然后点击vmware上方虚拟机: 003、点击设置 004、点击选项 005、 006、 007、 008、选择第一步在D盘创建的share文件夹,并点击确定: 009、
001、测试1 root@PC1:/home/test# ls ## 3个测试文件 a.txt b.txt c.txt root@PC1:/home/test# cat a.txt a j 6 b d j root@PC1:/home/test# cat b.txt 3 7 k j x v root@PC1:/home/test# cat c.txt i 8 k 6 a d root@PC1:/home/test# grep -l "a&quo
001、方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat a.fasta ## 测试fasta文件 >Rosalind_6404 CCTGCGGAAGATCGGCACTAGAATAGCCAGAACCGTTTCTCTGAGGCTTCCGGCCTTCCC TCCCACTAATAATTCTGAGG >Rosalind_5959 CCATC
001、方法1: root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python out_file = open("result.txt", "w") str1 = "AAAACCCGGT" ## 转换序列 str1 = str1.upper
001: p:输出缓冲区中的所有内容。 P:输出缓冲区中一个个换行符之前的内容 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 5 ## N的作用是预先读取下一行,将两行作为一行来处理,即两行内容储
001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt e ds d g d E d G D f (base) root@PC1:/home/test4# sed 's/e/MMM/' a.txt ## e替换为MMM MMM ds d g d E d G D f (base) root@PC1:/home/test4# cat a.txt e ds d g d E
001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 (base) root@PC1:/home/test2# sed 'n; s/a/M/g' a.txt ## n;将两行合并为一行, 保护第一行 a1 M2 a3 M4 a5 M6 a7 M8 a9 M10 002、 (base) roo
001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/k/{n;d}' a.txt ## 删除匹配k之后的一行 1 2 3 k 5 6 7 k 9 10 (base) root@PC1:/home/test2# cat a.txt 1 2 3 k 4 5 6
001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt ## 测试数据 This is 1 This is 2 This is 3 This is 4 This is 5 (base) root@PC1:/home/test4# sed = a.txt ## 在每一行之前插入编号 1 This is 1 2 This is 2 3 This is
001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt 1 2 3 4 5 6 7 8 9 10 (base) root@PC1:/home/test2# cat a.txt | sed 'N; s/\n/\t/' ## 以两行为单位,将换行符替换为制表符 1 2 3 4 5 6 7 8 9 10
001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/k/, +2{/k/b; d}' a.txt ## 删除匹配k之后的两行 1 2 3 k 6 7 k 10 (base) root@PC1:/home/test2# sed '/k/, +1{
001、方法1 root@PC1:/home/test# ls a.txt test.py root@PC1:/home/test# cat a.txt ## 测试数据 #chromosome nc_accession gene gene_id ccds_id ccds_status cds_strand cds_from cds_to cds_loc
001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 e f k s g d a c m s e g (base) root@PC1:/home/test2# sed 's/m/Q/g' a.txt ## 将m替换为Q e f k s g d a c Q s e g (base) root@PC1:/home/test2# sed 's/m\|k/Q/g&
001、 方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = dict() for i in in_file: i = i.strip() if i[0] == &qu
001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat a.fastq ## 测试fastq文件 @DJB775P1:248:D0MDGACXX:7:1202:12362:49613 TGCTTACTCTGCGTTGATACCACTGCTTAGATCGGAAGAGCACACGTCTGAA + JJJJJIIJJJJJJHIHHHGHFFFFFFCEEEEEDBD
001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fastq", "r") out_file = open("result.txt", "w") dict1 = {} idx = 0 for i
001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gene2 jun ACCGAATCGGAGCGATG GGCATTAAAGATCTAGCT >gene3 malat1 AGGCTAGCGAG GCGCGAG GATT
001、 [ -s file ]:文件存在且不为0是为真。 (base) root@PC1:/home/test2# ls a.txt b.txt (base) root@PC1:/home/test2# ll -h ## 列出a.txt和b.txt文件的大小 total 12K drwxr-xr-x 2 root root 4.0K 8月 11 13:42 ./ drwxr-xr-x 10 root root 4.0K 8
001、 (base) root@PC1:/home/test# ls a.fasta test.py (base) root@PC1:/home/test# cat a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCCGTTAATGCCGGCCGATTCAAATAA CCTCTGGCAACACCCGCTCCGGCAATGTATAGTTCACCGATACATCCAACAGGCAGCATC GGC
001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# shasum a.txt 8b945928bcfa1a6018f3e65d83ad27c6879bd6c8 a.txt [root@PC1 test4]# shasum --algorithm 256 a.txt 728c991fa4a6278284a98a4ce5e9021c4a847029c318c14899e9f0fb1107c15e a.txt [root@PC1 test4]# shas
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 snp17 0 380470 8 snp
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.map.gz outcome.map 002、解压缩保留源文件 root@PC1:/home/test2# ls outcome.map