ICode9

精准搜索请尝试: 精确搜索
  • 课目总结 关于两台PC抓包 与 交换机mac地址表2022-09-14 18:00:08

    ​ 一,两台PC直连ping测抓包流程   ​编辑 关于ARP协议的状况,由于PC1不知道PC2 的mac地址,所以PC1第一次传输时进行了一次广播,像所有PC端询问位于 1.1.1.3的PC2 所在的mac地址,PC2收到信息后进行恢复 告知位于 1.1.1.1 的PC1 自己的mac地址,由此PC1与PC2才进行了数据交流。 ​编辑

  • linux 中磁盘容量配额2022-09-14 00:02:23

      001、查看一下当前系统 [root@PC1 home]# hostnamectl Static hostname: PC1 Icon name: computer Chassis: n/a Machine ID: 8f7f58c7ef6f42489c3251e9f474be72 Boot ID: e43741739e584fb4930cf608e15aed74 Virtualization: v

  • linux 中 生成文件的sha1码2022-09-11 17:32:11

      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

  • linux中如何实现vmware虚拟机与本地共享文件夹2022-09-11 12:32:39

      001、在本地创建共享目录, 比如在D盘创建一个share目录:     002、打开vmware及虚拟机; 然后点击vmware上方虚拟机:     003、点击设置     004、点击选项     005、     006、     007、     008、选择第一步在D盘创建的share文件夹,并点击确定:     009、

  • linux 中输出同时包含多个指定字符的文件2022-09-09 18:34:26

      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

  • python 中统计不同scafflod的GC含量并输出GC含量最高的scafflod2022-08-18 08:30:23

      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

  • python中生成指定序列的反向互补序列2022-08-18 08:00:47

      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

  • linux 中sed命令 P和p的区别2022-08-17 17:02:31

      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的作用是预先读取下一行,将两行作为一行来处理,即两行内容储

  • linux 中 sed命令替换命令时i选项忽略大小写2022-08-17 06:30:09

      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

  • linux 中 sed n选项将两行作为一行处理,屏蔽第一行2022-08-17 02:01:35

      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

  • linux 中sed命令的保护模式b选项2022-08-17 01:33: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/{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

  • linux 中 sed = 选项在每一行之前插入编号2022-08-17 01:30:44

      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

  • linux 中 sed N选项将两行合并为一行处理2022-08-17 01:30:20

      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

  • linux 中sed命令删除匹配字符之后的若干行2022-08-17 01:00:21

      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{

  • python中统计人类基因组的外显子总长度(部分测试序列)2022-08-16 23:32:52

      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

  • linux 中sed命令如何同时将多个字符替换为指定字符2022-08-16 21:31:11

      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&

  • python 中实现按照 fasta文件的scaffold进行排序2022-08-15 18:33:47

      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

  • python 中统计fastq文件中 GC含量2022-08-15 17:01:58

      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

  • python 中实现切除fastq文件序列的前后若干碱基2022-08-15 16:01:05

      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

  • python中提取原始序列名字第一个空格前的名字作为的序列名字,输出到屏幕2022-08-13 18:33:26

      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

  • linux 中 if条件判断符 [ -s file ]选项2022-08-11 14:03:26

      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

  • python中统计基因组所含N碱基总个数2022-08-08 13:00:09

      001、 (base) root@PC1:/home/test# ls a.fasta test.py (base) root@PC1:/home/test# cat a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCCGTTAATGCCGGCCGATTCAAATAA CCTCTGGCAACACCCGCTCCGGCAATGTATAGTTCACCGATACATCCAACAGGCAGCATC GGC

  • linux 中 shasum命令2022-08-08 00:00:41

      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

  • linux 中 awk print > 选项实现 按照特定列拆分数据2022-08-03 01:00:51

      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

  • linux 中 gz文件压缩保留源文件、解压缩保留源文件2022-08-03 00:32:19

      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

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有