随笔分类 - linux shell
摘要:001、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt 1 2 3 4 5 6 7 8 9 e f s f g u d f x a d s g s c s e s z c b e g c s d f 002、提取包含
阅读全文
摘要:1、系统信息 root@ubuntu2204test01:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Coden
阅读全文
摘要:1、系统信息 root@ubuntu2204test01:/home# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 C
阅读全文
摘要:1、 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt | tee xx.txt ## 输出屏幕的结果 保存至xx.txt dd ff ii xx jj ee xx vv mm root@PC1:/home/test# ls a
阅读全文
摘要:1、基本用法 wget https://s3.amazonaws.com/plink1-assets/plink_linux_x86_64_20220402.zip 2、指定下载目录 wget -P /home/test2/ https://s3.amazonaws.com/plink1-asset
阅读全文
摘要:1、 \s表示空白字符。 \S表示非空白字符。 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt a abckf ff b dfabc fd c abc drfd d df.abcfd fd e df~abc dr f abc.df fd g
阅读全文
摘要:001、问题 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 73 dar 87 32 dar.3 fdg fd dar-5 dg df dar~df gfdg df ee.dar 34 er fd-dar 767 df df
阅读全文
摘要:1、 [root@PC1 test3]# ls a.txt [root@PC1 test3]# cat a.txt ## 测试数据 8.34565 3.23445 7.32423 0 8.343532523 5.34355 3.355623253 0 0 [root@PC1 test3]# awk
阅读全文
摘要:1、 [root@PC1 test2]# ls a.txt b.txt test.sh [root@PC1 test2]# cat a.txt ## 测试数据 8 2 4 8 7 3 [root@PC1 test2]# cat b.txt 8 3 4 8 5 3 6 [root@PC1 test2]
阅读全文
摘要:1、 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt 8 4 2 2 8 3 1 3 4 3 4 6 [root@PC1 test2]# awk 'BEGIN{a = 0} {print $1 - a; a = $1}' a.txt ##
阅读全文
摘要:1、输出列的累加和 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt 8 4 2 2 8 3 1 3 4 3 4 6 [root@PC1 test2]# awk '{sum += $1} {print sum}' a.txt ## 第一列累
阅读全文
摘要:1、date命令 [root@PC1 home]# date ## 显示当前时间 Tue May 31 16:39:18 EDT 2022 [root@PC1 home]# date "+%H:%M:%S" ## 时分秒 16:39:29 [root@PC1 home]# date "+%Y-%m-
阅读全文
摘要:1、查看系统 [root@PC1 home]# cat /etc/redhat-release Red Hat Enterprise Linux release 9.0 (Plow) 2、测试yum仓库 [root@PC1 home]# yum install httpd Updating Subs
阅读全文
摘要:1、查看系统 [root@PC1 home]# cat /etc/system-release Red Hat Enterprise Linux release 9.0 (Plow) 2、当前IP [root@PC1 home]# ifconfig | head ens160: flags=4163
阅读全文
摘要:1、查看系统 [root@PC1 network-scripts]# hostnamectl Static hostname: PC1 Icon name: computer-vm Chassis: vm 🖴 Machine ID: 43d69e6f6dc9444d83a0047a6a16c037
阅读全文
摘要:1、测试yum仓库 [root@localhost ~]# yum install httpd Updating Subscription Management repositories. Unable to read consumer identity This system is not reg
阅读全文
摘要:1、系统 [root@localhost ~]# cat /etc/system-release Red Hat Enterprise Linux release 8.5 (Ootpa) 2、点击网络设置 3、 4、 5、 6、 7、 8、 [root@localhost ~]# ifconfig
阅读全文
摘要:1、系统 [root@localhost ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa) 2、进入/etc/sysconfig/network-scripts/目录,编辑目录下网卡配置文件: [root
阅读全文
摘要:001、 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt ## 测试数据 chr logl_H1 l_remle p_wald 1 -3.078836e+03 1.000000e+05 6.973924e-01
阅读全文
摘要:1、 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt ## 测试数据 3.3724 34.348 988.383 0.0001 34.837 381.439 3.2534 32.732 358.346 root@PC1:/
阅读全文