随笔分类 - linux shell
摘要:001、 [root@PC1 test]# ls test [root@PC1 test]# tree -h . └── [ 32] test ├── [ 86M] a.txt └── [ 43] dir01 ├── [ 7.6M] a.txt ├── [ 7.6M] b.txt └── [ 19]
阅读全文
Error response from daemon: Get "[https://registry-1.docker.io/v2/](https://registry-1.docker.io/v2/
摘要:001、docker报错如下: Error response from daemon: Get "[https://registry-1.docker.io/v2/](https://registry-1.docker.io/v2/ 002、问题原因 docker镜像失效 003、修改镜像配置文件,
阅读全文
摘要:001、docker报错如下: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalct
阅读全文
摘要:001、生成测试数据 [root@PC1 test]# ls [root@PC1 test]# touch {001..100}.txt ## 生成测试数据 [root@PC1 test]# ls 001.txt 009.txt 017.txt 025.txt 033.txt 041.txt 049
阅读全文
摘要:001、Linux中eval命令时内建命令,其作用是会执行字符串内部的命令 [root@PC1 test]# echo "seq 5" ## seq 5写入字符串 seq 5 [root@PC1 test]# eval "seq 5" ## eval可以执行字符串内部的命令 1 2 3 4 5 。
阅读全文
摘要:001、查看系统信息 [root@PC1 software]# hostnamectl Static hostname: PC1 Icon name: computer-vm Chassis: vm Machine ID: 7c6deea1d66945718f62729ea78d608a Boot
阅读全文
摘要:001、docker报错如下: (cbbb6f6b7a37cc822450064fe49000a2415d513d9c1be1d14143cfd64a9e5c6d): Bind for 0.0.0.0:3000 failed: port is already allocated 002、解决方法:
阅读全文
摘要:Linux 中awk命令如何同时指定两个分割符 001、方法1 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 01_02 03 04 05 06:07 08 09@10 11 12 13 14 15_6 17 18 19 20 [root@
阅读全文
摘要:001、非root用户安装、配置gsl环境变量,编译软件环境报错如下: 002、非root用户安装gsl a、下载地址 http://mirrors.ustc.edu.cn/gnu/gsl/gsl-2.5.tar.gz b、编译安装 tar -xzvf gsl-2.5.tar.gz cd gsl-2
阅读全文
摘要:001、rpm:redhat package manager: -q:query a:all rpm -qa: 列出所有的已经安装的包。 002、等价于 :yum list installed
阅读全文
摘要:001、 cc: 错误:/usr/local/lib/libgsl.a:没有那个文件或目录 002、下载:http://mirrors.ustc.edu.cn/gnu/gsl/gsl-2.5.tar.gz 003、解压: tar -xzvf gsl-2.5.tar.gz cd gsl-2.5/ ./
阅读全文
摘要:001、 tar.xz 后缀文件如何解压: tar -xvf dmd.2.111.0.linux.tar.xz ## 保留原始安装包
阅读全文
摘要:001、 删除每一行最后一个匹配的特定字符后边的部分 [root@localhost test]# ls a.txt [root@localhost test]# cat a.txt ## 测试数据 ab ad aj di ii rr [root@localhost test]# sed 's/\(
阅读全文
摘要:001、 [root@localhost test]# ls a.txt [root@localhost test]# cat a.txt ## 测试数据 ab ad aj dd ii rr [root@localhost test]# sed 's/\(.*\)a/\1Q/' a.txt ## 将
阅读全文
摘要:001、Linux中 ldconfig -p 命令 在 Linux 系统中,ldconfig -p 命令用于 列出系统中所有已知的动态库。这个命令会显示已经配置到 动态链接器缓存(ld.so.cache) 中的所有共享库。通过这个缓存,系统可以更快地找到动态库文件。
阅读全文
摘要:001、删除左侧第一个句号后边的所有内容 [root@PC1 test]# test="kk.aa.ee.ww" ## 测试变量 [root@PC1 test]# echo $test kk.aa.ee.ww [root@PC1 test]# result=${test%%.*} ## 删除左侧第一
阅读全文
摘要:001、 [b20223040323@admin2 test10]$ ls a.txt [b20223040323@admin2 test10]$ cat a.txt ## 测试数据 1.04089e-05 0.579063 1.22069e-05 1.1133e-05 0.517721 -1.10
阅读全文
摘要:shell脚本如何统计文本中特定字符连续出现的最多次数 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 32543aa8324daaaaa889 3244aa6666 [root@PC1 test]# grep -o
阅读全文
摘要:001、问题 环境变量处理失误导致基础命令调不出来: [root@PC1 ~]# ls bash: ls: command not found... Packages providing this file are: 'coreutils-single' 'coreutils' 002、应急方法 [
阅读全文

浙公网安备 33010602011771号