07 2021 档案

摘要:linux系统中scp命令实现服务器之间数据的传输 1、从本地服务器传输至另一台服务器 测试服务器连通性: [root@centos79 test]# ifconfig | head -n 3 ## 查看本机服务器ip ens32: flags=4163<UP,BROADCAST,RUNNING,M 阅读全文
posted @ 2021-07-31 13:18 小鲨鱼2018 阅读(246) 评论(0) 推荐(0) 编辑
摘要:1、下载进NCBI官网 2、 3、 4、根据系统选择版本,下载即可 5、查看自己系统 [root@PC3 software]# hostnamectl Static hostname: PC3 Icon name: computer Chassis: n/a Machine ID: b7fae4ce 阅读全文
posted @ 2021-07-31 12:08 小鲨鱼2018 阅读(2574) 评论(0) 推荐(1) 编辑
摘要:sra数据的下载 1、打开ncbi官网,(测试的数据连接: https://genome.cshlp.org/content/24/8/1308.long) 2、 3、 4、依次点击 5、选择下载工具下载即可 阅读全文
posted @ 2021-07-31 11:40 小鲨鱼2018 阅读(558) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos7 test]# cat a.txt 1 2 3 4 5 6 7 8 9 2、 数字的作用相当于print? [root@centos7 test]# cat a.txt 1 2 3 4 5 6 7 8 9 [root@centos7 test]# awk '{ 阅读全文
posted @ 2021-07-29 12:41 小鲨鱼2018 阅读(165) 评论(0) 推荐(0) 编辑
摘要:1、c语言中如何创建、存储、输出字符串、输出字符串的大小、字符串的长度 #include <stdio.h> #include <string.h> int main(void) { char name[128]; //使用数组存储字符串 int size, len; printf("please 阅读全文
posted @ 2021-07-29 00:26 小鲨鱼2018 阅读(1115) 评论(0) 推荐(0) 编辑
摘要:1、查看系统 [root@centos8pc2 network-scripts]# hostnamectl Static hostname: centos8pc2 Icon name: computer-vm Chassis: vm Machine ID: f021cde3a91b4a2688dbe 阅读全文
posted @ 2021-07-28 19:52 小鲨鱼2018 阅读(2575) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> int main(void) { int ch; printf("please input an number for char type: "); scanf("%d", &ch); printf("%d is equivalent to %c.\n", ch 阅读全文
posted @ 2021-07-27 23:29 小鲨鱼2018 阅读(26) 评论(0) 推荐(0) 编辑
摘要:1、 #include <stdio.h> #include <float.h> #include <limits.h> int main(void) { int big_int = 2147483647; float big_float = 3.4E38; float small_float = 阅读全文
posted @ 2021-07-27 23:26 小鲨鱼2018 阅读(52) 评论(0) 推荐(0) 编辑
摘要:1、c语言中如何处理整数值的上溢。 #include <stdio.h> int main(void) { int i; int j = 1; for(i = 1; i <= sizeof(int) * 8 - 1; i++) { j *= 2; } printf("j = %d.\n", j - 阅读全文
posted @ 2021-07-27 22:36 小鲨鱼2018 阅读(549) 评论(0) 推荐(0) 编辑
摘要:由于c语言中数据类型实际所占存储位数和精度和具体平台相关,c语言的规范并没有强制和详细的规定, 因此c语言程序在移植过程中可能会出现不同平台数据类型不兼容 的状况。 为了解决这个问题,c语言在可移植类型stdint.h和inttype.h中规定了精确宽度整数类型,以确保c语言的类型在各系统内功能相同 阅读全文
posted @ 2021-07-26 23:30 小鲨鱼2018 阅读(338) 评论(0) 推荐(0) 编辑
摘要:c语言中使用sizeof()输出各种数据类型的大小。 #include <stdio.h> int main(void) { printf("short: %zd.\n", sizeof(short)); printf("int: %zd.\n", sizeof(int)); printf("lon 阅读全文
posted @ 2021-07-26 23:05 小鲨鱼2018 阅读(4218) 评论(0) 推荐(0) 编辑
摘要:c语言中浮点数的声明与输出。 [root@centos79 test]# cat test2.c #include <stdio.h> int main(void) { float f = 1000.0; double d = 1000.0; long double ld = 1000.0; pri 阅读全文
posted @ 2021-07-26 22:52 小鲨鱼2018 阅读(500) 评论(0) 推荐(0) 编辑
摘要:char类型用于存储字符(比如字母或者标点),但是从技术层面讲,char类型是整数,因为char类型存储的是整数而不是字符。 计算机使用字符编码来处理字符,即 用特定的整数来表示特定的字符。 例如在ASCII编码中, 大写字母A存储的是65. char类型通常被定义为8位的存储单元。 通常1个字节被 阅读全文
posted @ 2021-07-26 22:31 小鲨鱼2018 阅读(9345) 评论(0) 推荐(0) 编辑
摘要:1、 #include <stdio.h> int main(void) { signed short ss= 100; unsigned short us= 100; signed int si= 100; unsigned int ui= 100; signed long sl= 100; un 阅读全文
posted @ 2021-07-26 21:29 小鲨鱼2018 阅读(107) 评论(0) 推荐(0) 编辑
摘要:1、 #include <stdio.h> int main(void) { int num = 100; printf("decimal: %d.\n\n", num); printf("octal: %o.\n", num); printf("octal: %#o.\n\n", num); pr 阅读全文
posted @ 2021-07-26 21:17 小鲨鱼2018 阅读(243) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# ls [root@centos79 test]# mkdir test1 [root@centos79 test]# touch test1/a.txt [root@centos79 test]# ll total 0 drwxr-xr-x. 阅读全文
posted @ 2021-07-26 10:49 小鲨鱼2018 阅读(2802) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt e r w i s g n c w d h x 2、awk [root@centos79 test]# cat a.txt e r w i s g n c w d h x [root@centos79 test]# awk 阅读全文
posted @ 2021-07-26 00:26 小鲨鱼2018 阅读(1347) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 2、生成中间文件,假设4行为一列 [root@centos79 test]# cat a.txt 01 阅读全文
posted @ 2021-07-25 23:59 小鲨鱼2018 阅读(230) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt e t c i w s g g d z c i o n m 2、转换为一行 [root@centos79 test]# cat a.txt e t c i w s g g d z c i o n m [root@cento 阅读全文
posted @ 2021-07-25 23:36 小鲨鱼2018 阅读(97) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 阅读全文
posted @ 2021-07-25 23:21 小鲨鱼2018 阅读(267) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 3 f k i s d g k z v m x e 5 8 y 2、xargs [root@centos79 test]# cat a.txt 3 f k i s d g k z v m x e 5 8 y [root@c 阅读全文
posted @ 2021-07-25 00:05 小鲨鱼2018 阅读(571) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 3 s g a e f k n y 2、xargs [root@centos79 test]# cat a.txt 3 s g a e f k n y [root@centos79 test]# cat a.txt | x 阅读全文
posted @ 2021-07-24 23:49 小鲨鱼2018 阅读(327) 评论(0) 推荐(0) 编辑
摘要:1、问题 [root@centos79 test]# unlzma test_chr22.tar.lzma bash: unlzma: command not found... 2、 [root@centos79 test]# yum install -y lzma Loaded plugins: 阅读全文
posted @ 2021-07-24 19:33 小鲨鱼2018 阅读(150) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e e t s t e s r d g e s w t e [root@PC3 test]# cat c.txt 1 x r 阅读全文
posted @ 2021-07-24 13:28 小鲨鱼2018 阅读(287) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e e t s t e s r d g e s w t e [root@PC3 test]# cat b.txt 1 3 5 阅读全文
posted @ 2021-07-24 12:48 小鲨鱼2018 阅读(843) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e 2、将3-5列中的e替换为x [root@PC3 test]# cat a.txt e r e y e u e e e 阅读全文
posted @ 2021-07-24 12:41 小鲨鱼2018 阅读(994) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e 2、将每行的第3个e即其后的e替换为x [root@PC3 test]# cat a.txt e r e y e u e 阅读全文
posted @ 2021-07-24 01:58 小鲨鱼2018 阅读(227) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r t y d a d g 4 3 1 3 d g k 2、awk实现 [root@PC3 test]# cat a.txt e r t y d a d g 4 3 1 3 d g k [root@PC3 test]# awk 阅读全文
posted @ 2021-07-24 01:50 小鲨鱼2018 阅读(76) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@PC3 test]# cat b.txt sfg3 dg2k 2、删除第三个字符,sed删除 [root@PC3 test]# cat b.txt sfg3 dg2k [root@PC3 test]# sed 's/.//3' b.txt sf3 dgk 3、cut删除 [ 阅读全文
posted @ 2021-07-24 01:46 小鲨鱼2018 阅读(433) 评论(0) 推荐(0) 编辑
摘要:1、free [root@PC3 /]# free total used free shared buffers cached Mem: 8162676 7297800 864876 9584 32 6237016 -/+ buffers/cache: 1060752 7101924 Swap: 8 阅读全文
posted @ 2021-07-24 01:05 小鲨鱼2018 阅读(1504) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 2、xargs [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 [root@cento 阅读全文
posted @ 2021-07-22 00:18 小鲨鱼2018 阅读(324) 评论(0) 推荐(0) 编辑
摘要:1、 test <- read.table("a.txt", as.is = T) test index <- read.table("cols",as.is = T) index index <- as.vector(t(index)) index test2 <- test[,index] te 阅读全文
posted @ 2021-07-21 23:48 小鲨鱼2018 阅读(6929) 评论(0) 推荐(0) 编辑
摘要:1、 [root@centos79 test]# cat a.txt test3_1_clean.fq.gz test3_2_clean.fq.gz test4_1_clean.fq.gz test4_2_clean.fq.gz test5_1_clean.fq.gz test5_2_clean.f 阅读全文
posted @ 2021-07-21 23:14 小鲨鱼2018 阅读(138) 评论(0) 推荐(0) 编辑
摘要:linux系统中批量提取指定列的数据。 1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 03 0f 0t 0s 0g 0y 0a 0d 0e 0n 07 03 0 阅读全文
posted @ 2021-07-21 19:58 小鲨鱼2018 阅读(2026) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 01 3 4 02 f s 03 t 3 04 s d 05 g i 06 y e 07 a w 08 d g 09 e w 10 n u 11 7 8 12 3 s 13 a d 14 g e 15 w a 16 z v 阅读全文
posted @ 2021-07-21 19:23 小鲨鱼2018 阅读(2231) 评论(0) 推荐(0) 编辑
摘要:linux系统中nl命令 1、测试数据 [root@centos79 test3]# cat a.txt e 3 8 i d f a e 8 3 s g g j 2 z t y c g s g s a 2、nl命令 [root@centos79 test3]# cat a.txt e 3 8 i d 阅读全文
posted @ 2021-07-21 13:53 小鲨鱼2018 阅读(284) 评论(0) 推荐(0) 编辑
摘要:1、 脚本如下: [root@centos79 test2]# cat test.sh #!/bin/bash if [ $# -ne 1 ] ## $#表示一共有几个参数 then echo "usage bash test.sh number" exit 1 else echo "sqrt($1 阅读全文
posted @ 2021-07-21 13:36 小鲨鱼2018 阅读(965) 评论(0) 推荐(0) 编辑
摘要:linux系统中pgrep用于查找进程 1、查找与命令相关的进程 [root@centos79 test]# pgrep sort [root@centos79 test]# 启动一个sort命令测试: [root@centos79 test]# seq -f test%03g 100000000| 阅读全文
posted @ 2021-07-21 13:16 小鲨鱼2018 阅读(198) 评论(0) 推荐(0) 编辑
摘要:c语言中显示各种数据类型的大小。 #include <stdio.h> int main(void) { //char type printf("char: %zd.\n\n", sizeof(char)); //integer type printf("short: %zd.\n", sizeof 阅读全文
posted @ 2021-07-20 22:56 小鲨鱼2018 阅读(344) 评论(0) 推荐(0) 编辑
摘要:c语言中浮点数的舍入错误。 1、 #include <stdio.h> int main(void) { float a, b; b = 2.0e20 + 1.0; a = b - 2.0e20; float c, d; d = 2.0e5 + 1.0; c = d - 2.0e5; printf( 阅读全文
posted @ 2021-07-20 22:06 小鲨鱼2018 阅读(207) 评论(0) 推荐(0) 编辑
摘要:1、c语言中浮点值的上溢 #include <stdio.h> int main(void) { float test1 = 5.2e4 * 100.0f; float test2 = 5.2e40 * 100.0f; //超出float类型可以表示的范围。 printf("test1: %e.\n 阅读全文
posted @ 2021-07-20 22:00 小鲨鱼2018 阅读(341) 评论(0) 推荐(0) 编辑
摘要:c语言中打印浮点数。 #include <stdio.h> int main(void) { float f = 100.0; double d = 1.0e2; long double ld = 1.0e2; printf("float: %f.\n", f); printf("float: %e 阅读全文
posted @ 2021-07-19 23:48 小鲨鱼2018 阅读(2305) 评论(0) 推荐(0) 编辑
摘要:1、测试文件 [root@centos79 test]# cat a.txt 3 5 6 s f s d g d e w f g e k [root@centos79 test]# cat b.txt 3 5 6 s f s d g d e w f g e k 2、直接使用diff [root@ce 阅读全文
posted @ 2021-07-19 00:33 小鲨鱼2018 阅读(155) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat -A a.txt SUN08^ISUN09^ISUN10^M$ dddd^I33333^Icdddd^M$ dddd^I11111^I55555^M$ 2、dos2unix删除 [root@centos79 test]# cat a. 阅读全文
posted @ 2021-07-17 22:56 小鲨鱼2018 阅读(395) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e 2、实现第一列和第三列的互换 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e [root@centos79 阅读全文
posted @ 2021-07-17 14:42 小鲨鱼2018 阅读(937) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e 2、删除第二列 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e [root@centos79 test3] 阅读全文
posted @ 2021-07-17 14:37 小鲨鱼2018 阅读(12806) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cat b.txt 4 5 6 2 d 2 s g y 2、将b.txt中的第2列用a.txt中的第3列进行替换 [root@ce 阅读全文
posted @ 2021-07-17 01:59 小鲨鱼2018 阅读(2303) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt e t q t x g a w i k h e 2、cut删除 [root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# c 阅读全文
posted @ 2021-07-17 01:53 小鲨鱼2018 阅读(5639) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-15 22:10 小鲨鱼2018 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-15 20:15 小鲨鱼2018 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-15 20:01 小鲨鱼2018 阅读(15) 评论(0) 推荐(0) 编辑
摘要:1、c语言中,一个char类型被定义为一个字节所占的位数(8位) char类型用于表示字符(字母或特殊符号,也可以表示较小的整数),但是从技术层面上看,char类型是整数类型,因为char类型是以整数进行存储的。 c语言使用数字-字符编码来处理char类型,也就是说用特定的整数来表示特定的字符。 标 阅读全文
posted @ 2021-07-15 00:50 小鲨鱼2018 阅读(1068) 评论(0) 推荐(0) 编辑
摘要:1、 #include <stdio.h> int main(void) { signed short int num1 = 10; unsigned short int num2= 10; signed int num3 = 10; unsigned int num4 = 10; signed l 阅读全文
posted @ 2021-07-14 23:14 小鲨鱼2018 阅读(80) 评论(0) 推荐(0) 编辑
摘要:1、测试数据sname.csv 1 a 2 b 3 c 4 b 5 d 6 e 7 e 8 f 9 g 10 f test <- read.csv("sname.csv", header = F) test dupid <- test$V2[duplicated(test$V2)] dupid <- 阅读全文
posted @ 2021-07-13 22:27 小鲨鱼2018 阅读(359) 评论(0) 推荐(0) 编辑
摘要:1、以以下程序为例: #include <stdio.h> int main(void) { int i = 2147483647; //int类型可以表示的数值范围为 -2147483648 ~ 2147483647 unsigned int j = 4294967295; //unsigned 阅读全文
posted @ 2021-07-13 00:38 小鲨鱼2018 阅读(530) 评论(0) 推荐(0) 编辑
摘要:1、主要原因是硬件限制和效率问题。 阅读全文
posted @ 2021-07-12 23:58 小鲨鱼2018 阅读(266) 评论(0) 推荐(0) 编辑
摘要:1、 c语言中,计算机以不同的前缀表示计算机采用哪种进制的数显示数值。 0表示8进制数的前缀。 0x和0X都表示16进制数的前缀。 比如十进制数16使用8进制数表示是020。(2乘以8的1次方)。 十进制数16使用16进制数表示是0x10。(1乘以16的1次方)。 在程序中,8进制数的转换说明是%# 阅读全文
posted @ 2021-07-12 23:19 小鲨鱼2018 阅读(3047) 评论(0) 推荐(0) 编辑
摘要:字(word)是设计计算机时给定的自然存储单位。 计算机的字长越大,其数据转移越快,允许的内存访问也更多。 计算机在存储、传送或操作时,作为一个单元的一组二进制码称为字,一个字中的二进制位的位数称为字长。 字长在计算机结构和操作的多个方面均有体现。计算机中大多数寄存器的大小是一个字长。计算机处理的典 阅读全文
posted @ 2021-07-12 00:21 小鲨鱼2018 阅读(2546) 评论(0) 推荐(0) 编辑
摘要:tee命令将输出到屏幕上的内容保存至文件中。 1、 [root@centos7 test]# ls [root@centos7 test]# seq 3 1 2 3 [root@centos7 test]# ls [root@centos7 test]# seq 3 | tee a.txt 1 2 阅读全文
posted @ 2021-07-10 14:06 小鲨鱼2018 阅读(234) 评论(0) 推荐(0) 编辑
摘要:若向量组A可由向量组B线性表示,则R(A) <= R(B). 阅读全文
posted @ 2021-07-10 11:04 小鲨鱼2018 阅读(4138) 评论(0) 推荐(0) 编辑
摘要:c语言中数据类型基本分类。 通过这些关键字创建的类型,根据计算机的存储方式可分为两大基本类型: 整数类型和浮点数类型 阅读全文
posted @ 2021-07-09 22:12 小鲨鱼2018 阅读(312) 评论(0) 推荐(0) 编辑
摘要:1、逻辑cpu个数(线程数) [root@centos79 test]# cat /proc/cpuinfo | grep "processor" processor : 0 processor : 1 processor : 2 processor : 3 [root@centos79 test] 阅读全文
posted @ 2021-07-09 19:46 小鲨鱼2018 阅读(1032) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t s c E a R t e 4 s 2、删除包含字符k后的一行 [root@centos79 test]# cat a.txt 3 4 5 阅读全文
posted @ 2021-07-09 13:20 小鲨鱼2018 阅读(2086) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、head命令删除最后三行 [root@centos79 te 阅读全文
posted @ 2021-07-09 12:56 小鲨鱼2018 阅读(4125) 评论(0) 推荐(1) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、删除匹配k的行及其后2行 [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 阅读全文
posted @ 2021-07-09 00:44 小鲨鱼2018 阅读(1511) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、将第2行替换为xxxx [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 阅读全文
posted @ 2021-07-09 00:33 小鲨鱼2018 阅读(5291) 评论(0) 推荐(0) 编辑
摘要:1、测试数据如下: [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、在第2行后插入xxxx [root@centos79 阅读全文
posted @ 2021-07-09 00:27 小鲨鱼2018 阅读(16988) 评论(0) 推荐(1) 编辑
摘要:1、测试数据如下: [root@centos79 test]# ls a.txt b.txt [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s [root@centos79 test]# c 阅读全文
posted @ 2021-07-09 00:02 小鲨鱼2018 阅读(468) 评论(0) 推荐(0) 编辑
摘要:1、 目前两种接口: sata接口 和 m.2接口 2、m.2接口 走两种总线: sata总线和PCIE总线, PCIE总线分位支持NVME协议和不支持NVME协议。 阅读全文
posted @ 2021-07-08 19:52 小鲨鱼2018 阅读(75) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、删除第二行 [root@centos79 test]# ca 阅读全文
posted @ 2021-07-08 19:19 小鲨鱼2018 阅读(1860) 评论(0) 推荐(0) 编辑
摘要:centos中安装那个cmake。 1、问题 [root@PC3 home]# cmake bash: cmake: command not found... Similar command is: 'make' 当前系统: [root@PC3 home]# lsb_release -a LSB V 阅读全文
posted @ 2021-07-08 18:54 小鲨鱼2018 阅读(9874) 评论(0) 推荐(0) 编辑
摘要:杂合度计算分为两种:位点杂合度和样本杂合度 1、计算位点杂合度,测试数据如下: [root@centos79 test]# ls outcome.map outcome.ped [root@centos79 test]# cat outcome.map ## 8个snp位点 1 snp1 0 559 阅读全文
posted @ 2021-07-08 13:55 小鲨鱼2018 阅读(3056) 评论(0) 推荐(0) 编辑
摘要:1、 [root@centos79 test]# cat a.txt 1 2 3 4 5 6 7 8 9 10 [root@centos79 test]# sed '/2/ s/^/xxx/' a.txt 1 xxx2 3 4 5 6 7 8 9 10 [root@centos79 test]# s 阅读全文
posted @ 2021-07-07 23:57 小鲨鱼2018 阅读(221) 评论(0) 推荐(0) 编辑
摘要:1、测试数据如下: [root@centos79 test]# seq 10 > a.txt [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt 1 2 3 4 5 6 7 8 9 10 2、提取第2行 [root@cento 阅读全文
posted @ 2021-07-07 23:05 小鲨鱼2018 阅读(23502) 评论(0) 推荐(2) 编辑
摘要:plink --filp命令实现正负链的反转 1、 [root@centos79 test]# ls ## 测试数据如下, 8个位点, 8个样本 a.txt outcome.map outcome.ped [root@centos79 test]# cat outcome.map 1 snp1 0 阅读全文
posted @ 2021-07-07 09:59 小鲨鱼2018 阅读(823) 评论(0) 推荐(0) 编辑
摘要:1、 dat <- read.table("test.map",header = F) dat2 <- dat[c(1,4)] unique(sort(dat2$V1)) dat2[dat2$V1 == "X",]$V1 = 10000 dat2$V1 <- as.numeric(dat2$V1) 阅读全文
posted @ 2021-07-06 13:23 小鲨鱼2018 阅读(204) 评论(0) 推荐(0) 编辑
摘要:1、 a <- c(1,3,10,6,2) class(a) order(a) ## 数值型, 排序结果 10 > 2 b <- c(1,3,10,6,2,"x") class(b) order(b) ##字符型,排序结果 10 < 2 阅读全文
posted @ 2021-07-06 12:13 小鲨鱼2018 阅读(313) 评论(0) 推荐(0) 编辑
摘要:linux系统中find命令 1、直接查找文件名 测试文件如下: [root@centos79 test]# ls 01.txt 02.csv 02.txt 03.csv 04.txt [root@centos79 test]# find "02.txt" 02.txt [root@centos79 阅读全文
posted @ 2021-07-05 22:15 小鲨鱼2018 阅读(208) 评论(0) 推荐(0) 编辑
摘要:1、查看环境变量 [root@centos79 tmp]# export | wc -l 29 [root@centos79 tmp]# export declare -x HISTCONTROL="ignoredups" declare -x HISTSIZE="1000" declare -x 阅读全文
posted @ 2021-07-05 21:48 小鲨鱼2018 阅读(768) 评论(0) 推荐(0) 编辑
摘要:1、rename命令 [root@centos79 test]# ls a.mp4 dup1.mp4 dup2.mp4 dup4.mp4 [root@centos79 test]# rename mp4 txt *.mp4 [root@centos79 test]# ls a.txt dup1.tx 阅读全文
posted @ 2021-07-05 19:42 小鲨鱼2018 阅读(226) 评论(0) 推荐(0) 编辑
摘要:1、别名配置文件为 ~/.bashrc. 例如将:为‘echo $?’命令指定别名为q: [root@centos79 ~]# vim ~/.bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias c 阅读全文
posted @ 2021-07-05 18:57 小鲨鱼2018 阅读(544) 评论(0) 推荐(0) 编辑
摘要:1、tr命令 -s 参数将多个连续的字符压缩为一个字符 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt aaabbbaaaccc a a bbbb ddddcccc [root@centos79 test]# tr -s 阅读全文
posted @ 2021-07-05 18:20 小鲨鱼2018 阅读(1030) 评论(0) 推荐(0) 编辑
摘要:1、split按文件大小拆分文件 测试数据如下: [root@centos79 test]# dd if=/dev/zero bs=1M count=100 of=a.txt 100+0 records in 100+0 records out 104857600 bytes (105 MB) co 阅读全文
posted @ 2021-07-05 17:33 小鲨鱼2018 阅读(321) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt a g a d g d a d g d g e g d a a a a d g d a a [root@centos79 test]# awk -F "a" '{print NF - 1}' a.txt ## 统计每行a出 阅读全文
posted @ 2021-07-05 00:03 小鲨鱼2018 阅读(237) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# ls a.txt b.txt [root@centos79 test]# cat a.txt a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 [root@centos79 test]# cat b.txt b1 b2 b3 b4 阅读全文
posted @ 2021-07-05 00:00 小鲨鱼2018 阅读(167) 评论(0) 推荐(0) 编辑
摘要:1、删除开头的空行 [root@centos79 test]# cat a.txt a g r e i x k like a f g liker a g r e a f g liker [root@centos79 test]# cp a.txt a.txt.bak [root@centos79 t 阅读全文
posted @ 2021-07-04 23:38 小鲨鱼2018 阅读(170) 评论(0) 推荐(0) 编辑
摘要:1、 [root@centos79 test]# echo $a [root@centos79 test]# a=10 [root@centos79 test]# echo $a 10 [root@centos79 test]# unset a ## 清除变量a [root@centos79 tes 阅读全文
posted @ 2021-07-04 23:10 小鲨鱼2018 阅读(117) 评论(0) 推荐(0) 编辑
摘要:linux系统中如何删除行首、行尾的空格 1、删除行首空格、制表符 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g r e i x k like a f g liker a g r e a f g liker [r 阅读全文
posted @ 2021-07-04 22:56 小鲨鱼2018 阅读(1435) 评论(0) 推荐(0) 编辑
摘要:1、在所有行后添加空行 [root@centos79 test]# cat a.txt a g r e i x k like a f g liker s t 2 a b d s i [root@centos79 test]# awk '{print $0 "\n"}' a.txt a g r e i 阅读全文
posted @ 2021-07-04 22:47 小鲨鱼2018 阅读(824) 评论(0) 推荐(0) 编辑
摘要:1、测试数据如下 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g r e i x k like a f g liker [root@centos79 test]# cat -A a.txt a g r e$ $ $ 阅读全文
posted @ 2021-07-04 20:45 小鲨鱼2018 阅读(875) 评论(0) 推荐(1) 编辑
摘要:linux系统中如何删除空行。 1、测试数据 a.txt [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g r e i x k like a f g liker [root@centos79 test]# cat - 阅读全文
posted @ 2021-07-04 20:17 小鲨鱼2018 阅读(327) 评论(0) 推荐(0) 编辑
摘要:1、 [root@centos79 test]# cat a.txt a g r e u c j alike i x k like a f g liker a f h g liker s g e g [root@centos79 test]# grep "^a" a.txt ## 查找以a开头的行 阅读全文
posted @ 2021-07-04 19:37 小鲨鱼2018 阅读(9267) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g e u c j alike i x k like w f g liker s g e g [root@centos79 test]# echo "b.t 阅读全文
posted @ 2021-07-04 19:18 小鲨鱼2018 阅读(948) 评论(0) 推荐(0) 编辑
摘要:1、测试数据 [root@centos79 test]# cat a.txt a g e u c j alike i x k like w f g liker s g e g [root@centos79 test]# grep like a.txt u c j alike i x k like w 阅读全文
posted @ 2021-07-04 18:57 小鲨鱼2018 阅读(664) 评论(0) 推荐(0) 编辑
摘要:linux系统中如何删除文件的最后几行 1、 [root@centos79 test]# cat a.txt a g e d c j i x a e i r x v b x e w [root@centos79 test]# head -n -2 a.txt a g e d c j i x a e 阅读全文
posted @ 2021-07-04 18:14 小鲨鱼2018 阅读(997) 评论(0) 推荐(0) 编辑
摘要:1、linux系统中如何统计文件的行数 [root@centos79 test]# cat b.txt a g e d c j i x a [root@centos79 test]# wc -l b.txt 3 b.txt 2、 [root@centos79 test]# cat b.txt a g 阅读全文
posted @ 2021-07-04 17:58 小鲨鱼2018 阅读(1196) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-03 13:52 小鲨鱼2018 阅读(230) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示