随笔分类 -  linux shell

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 77 下一页
摘要:001、 -i [root@PC1 test]# ls [root@PC1 test]# touch a.txt a.csv [root@PC1 test]# ls a.csv a.txt [root@PC1 test]# find ./ -name "*.txt" | xargs -i cp {} 阅读全文
posted @ 2023-05-08 21:56 小鲨鱼2018 阅读(254) 评论(0) 推荐(0)
摘要:001、不使用 -i选项 [root@PC1 test]# ls abva abvb abvc abvd dir1 dir2 dir3 dir4 dir5 [root@PC1 test]# ls | xargs mv {} {}.bak ## 不使用 -i选项 mv: cannot stat ‘{} 阅读全文
posted @ 2023-05-08 11:37 小鲨鱼2018 阅读(1551) 评论(4) 推荐(0)
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 33 ac kk dd adebc kk ad abc uy dd gg 88 [root@PC1 test]# grep -E "ab?c" a.txt ## "ab?c" 等价与 阅读全文
posted @ 2023-05-07 20:52 小鲨鱼2018 阅读(453) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test]# ls dir1 dir2 dir3 [root@PC1 test]# du -h ## 查看所有子目录占用磁盘的大小 100M ./dir1 300M ./dir2 30M ./dir3 430M . 阅读全文
posted @ 2023-05-07 20:30 小鲨鱼2018 阅读(330) 评论(0) 推荐(0)
摘要:001、 root@ubuntu01:~# cat /etc/issue Ubuntu 22.04.2 LTS \n \l 002、 root@ubuntu01:~# lsb_release -a No LSB modules are available. Distributor ID: Ubunt 阅读全文
posted @ 2023-05-07 17:16 小鲨鱼2018 阅读(251) 评论(0) 推荐(0)
摘要:source 命令会在当前 shell 中执行,而 bash 会创建一个新的 shell 会话。 001、 (base) root@DESKTOP-A31BQ38:/home/test2# ls test.sh (base) root@DESKTOP-A31BQ38:/home/test2# cat 阅读全文
posted @ 2023-05-07 00:17 小鲨鱼2018 阅读(212) 评论(0) 推荐(0)
摘要:001、 curl https://get.docker.com | sh 阅读全文
posted @ 2023-04-29 12:25 小鲨鱼2018 阅读(77) 评论(0) 推荐(0)
摘要:01、问题 02、ubuntu系统 root@DESKTOP-A31BQ38:/home/software# lsb_release -a 03、解决方法 root@DESKTOP-A31BQ38:/home/software# apt install bzip2 参考:https://blog.c 阅读全文
posted @ 2023-04-28 20:38 小鲨鱼2018 阅读(353) 评论(0) 推荐(0)
摘要:001、 (py38) root@DESKTOP-IDT9S0E:/home/test# ls a.txt index.txt record.sh (py38) root@DESKTOP-IDT9S0E:/home/test# cat a.txt ## 测试数据 01 02 03 04 05 06 阅读全文
posted @ 2023-04-26 15:05 小鲨鱼2018 阅读(130) 评论(0) 推荐(0)
摘要:001、 (py38) root@DESKTOP-IDT9S0E:/home/test# ls a.txt index.txt record.sh (py38) root@DESKTOP-IDT9S0E:/home/test# cat a.txt ## 测试数据 01 02 03 04 05 06 阅读全文
posted @ 2023-04-26 14:54 小鲨鱼2018 阅读(189) 评论(0) 推荐(0)
摘要:01、ubuntu系统: (py38) root@DESKTOP-IDT9S0E:/home/software/readfq# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubunt 阅读全文
posted @ 2023-04-26 08:51 小鲨鱼2018 阅读(41) 评论(0) 推荐(0)
摘要:001、 (py38) root@DESKTOP-IDT9S0E:/home/test# cat a.txt ## 测试数据 01 02 03 04 05 06 07 (py38) root@DESKTOP-IDT9S0E:/home/test# cat index.txt ## 计划批量删除的行号 阅读全文
posted @ 2023-04-25 22:36 小鲨鱼2018 阅读(303) 评论(0) 推荐(0)
摘要:001、 setfacl -m u:user2:r-x /public/home/user1 ## 授予user2对user1家目录的读和执行的权限 来源:劳老师 用户user1对用户user2授权访问例子:(1)授权user2可读写执行user1的家目录下的所有文件setfacl -m u:use 阅读全文
posted @ 2023-04-25 15:51 小鲨鱼2018 阅读(459) 评论(0) 推荐(0)
摘要:001、 (base) [b20223040323@admin1 test2]$ ls a.txt (base) [b20223040323@admin1 test2]$ cat a.txt ## 测试数目 6 8 9 3 7 5 2 5 6 8 8 2 4 2 7 (base) [b2022304 阅读全文
posted @ 2023-04-21 21:13 小鲨鱼2018 阅读(56) 评论(0) 推荐(0)
摘要:001、 (base) [b20223040323@admin1 test2]$ ls a.txt (base) [b20223040323@admin1 test2]$ cat a.txt ## 测试数据 er kj ab ab ab jk ab ab uy dd xy xy xy xy xy m 阅读全文
posted @ 2023-04-21 21:02 小鲨鱼2018 阅读(20) 评论(0) 推荐(0)
摘要:001、rev + cut -c实现 (base) [b20223040323@admin1 test]$ ls a.txt (base) [b20223040323@admin1 test]$ cat a.txt ## 测试数据 iuwe sdfdsf 2343 8dsfdj saff 32435 阅读全文
posted @ 2023-04-21 15:31 小鲨鱼2018 阅读(198) 评论(0) 推荐(0)
摘要:001、删除首次匹配字符及其之前的内容 root@DESKTOP-IDT9S0E:/home/test/test/test# ls a.txt root@DESKTOP-IDT9S0E:/home/test/test/test# cat a.txt ## 测试数据 awQQrQQ24QQ34QQr5 阅读全文
posted @ 2023-04-15 22:37 小鲨鱼2018 阅读(3203) 评论(0) 推荐(0)
摘要:001、 root@DESKTOP-IDT9S0E:/home/test/test/test# str1="Homo_sapiens.GRCh38.99.chgffromosome.22.gff3" root@DESKTOP-IDT9S0E:/home/test/test/test# str2=${ 阅读全文
posted @ 2023-04-15 22:13 小鲨鱼2018 阅读(450) 评论(0) 推荐(0)
摘要:001、dirname用于从绝对路径中剥离出路径 002、basename用于从绝对路径中剥离出文件名 测试: root@DESKTOP-IDT9S0E:~# ls root@DESKTOP-IDT9S0E:~# dirname /home/test2/a.sh ## dirname剥离出路径 /h 阅读全文
posted @ 2023-04-15 21:41 小鲨鱼2018 阅读(82) 评论(0) 推荐(0)
摘要:01、 systemctl enable ssh 02、 /lib/systemd/systemd-sysv-install enable ssh 阅读全文
posted @ 2023-04-13 15:12 小鲨鱼2018 阅读(641) 评论(0) 推荐(0)

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 77 下一页