随笔分类 -  linux shell

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 78 下一页
摘要:001、 [root@pc1 test1]# ll -h ## ll -h命令或者 ls -l命令 total 20M -rw-rw-r--. 2 root root 6.6M Dec 30 17:52 a.txt -rw-r--r--. 1 root root 6.6M Dec 30 17:53 阅读全文
posted @ 2023-12-30 18:08 小鲨鱼2018 阅读(606) 评论(0) 推荐(0)
摘要:粘滞位权限确保文件只能被文件的所有者(或者root用户)删除而不能被其他用户删除。linux系统中根目录下/tmp/默认设置了粘滞位权限。 001、设置粘滞位权限之前 [root@pc1 /]# pwd ## 当前目录 / [root@pc1 /]# whoami ## 当前用户 root [roo 阅读全文
posted @ 2023-12-30 17:42 小鲨鱼2018 阅读(597) 评论(0) 推荐(0)
摘要:001、 centos7 中根目录下各级目录 [root@pc1 /]# ls bin dev home lib64 mnt proc run srv tmp var boot etc lib media opt root sbin sys usr [root@pc1 /]# ll -h total 阅读全文
posted @ 2023-12-30 17:39 小鲨鱼2018 阅读(38) 评论(0) 推荐(0)
摘要:001、普通用户一般没有sudo权限 [zhangsan01@pc1 ~]$ ls [zhangsan01@pc1 ~]$ yum install httpd ## 直接无法调用yum仓库 Loaded plugins: fastestmirror, langpacks You need to be 阅读全文
posted @ 2023-12-30 16:07 小鲨鱼2018 阅读(1550) 评论(0) 推荐(0)
摘要:对用户名进行修改需要root权限或者普通用户的sudo权限。 001、对用户user01进行测试 [root@pc1 home]# pwd /home [root@pc1 home]# ls ## 用户user01 liujiaxin01 software user01 user02 [root@p 阅读全文
posted @ 2023-12-30 11:48 小鲨鱼2018 阅读(469) 评论(0) 推荐(0)
摘要:linux 中 ls -F选项,F表示文件类型。 文件末尾追加*表示是可执行文件; 文件末尾/表示是目录 文件末尾是@表示是软链接文件 001、 [root@pc1 test]# ls ## 测试目录 a.txt b.txt dir1 dir2 dir3 dir4 file1 file2 file3 阅读全文
posted @ 2023-12-30 11:03 小鲨鱼2018 阅读(314) 评论(0) 推荐(0)
摘要:linux chown命令用于改变文件或者目录的所有者或者所属组。 001、改变所有者需要具备root权限,普通用户无法修改 [user01@pc1 test1]$ ls a.txt [user01@pc1 test1]$ ll -h ## 文件的所有者为user01 total 109M -rw- 阅读全文
posted @ 2023-12-30 10:42 小鲨鱼2018 阅读(211) 评论(0) 推荐(0)
摘要:001、借助ls -F [root@pc1 test1]# ls aaa a.txt bbb b.txt c.txt ddd dir01 dir02 d.txt [root@pc1 test1]# ll -h ## 测试目录 total 16K lrwxrwxrwx. 1 root root 5 D 阅读全文
posted @ 2023-12-30 10:41 小鲨鱼2018 阅读(43) 评论(0) 推荐(0)
摘要:001、测试目录如下,分别包含目录、文件 [root@pc1 test]# ls ## 测试目录 dir1 dir2 dir3 dir4 file1 file2 file3 file4 002、仅对目录进行迭代 a、 [root@pc1 test]# ls ## 测试目录 dir1 dir2 dir 阅读全文
posted @ 2023-12-30 10:39 小鲨鱼2018 阅读(30) 评论(0) 推荐(0)
摘要:001、背景 两个测试用户分别是: user01 user02 目标:实现user01家目录下一共 有两个目录dir1和dir2; 实现user01家目录下的dir1对用户user02单独开放读写执行的权限。 002、测试未开放前user01下的dir1和dir2对用户user02是否有权限 [us 阅读全文
posted @ 2023-12-29 23:31 小鲨鱼2018 阅读(1370) 评论(0) 推荐(0)
摘要:001、测试数据, awk实现 [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 16 17 18 19 20 21 22 23 24 2 阅读全文
posted @ 2023-12-29 21:46 小鲨鱼2018 阅读(214) 评论(0) 推荐(0)
摘要:001、压缩为gz文件,同时保留源文件 [root@pc1 test]# ls a.txt [root@pc1 test]# gzip -c a.txt > a.txt.gz ## 压缩文件,同时保留源文件 [root@pc1 test]# ls a.txt a.txt.gz 002、 解压缩gz文 阅读全文
posted @ 2023-12-29 17:32 小鲨鱼2018 阅读(1185) 评论(0) 推荐(0)
摘要:001、服务器(server) 01、服务器是一台独立的计算机或计算机系统(物理设备), 也可以是虚拟机或容器等虚拟化技术创建的逻辑实体, 用于提供特定的服务或功能。 02、服务器负责处理客户端的请求,并提供所需的服务,如网站托管、数据库存储、文件共享等。 03、服务器通常作为单个实体运行,具有自己 阅读全文
posted @ 2023-12-24 17:07 小鲨鱼2018 阅读(156) 评论(0) 推荐(0)
摘要:001、\<或者\b限制词首 [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 13783120433 16 17 18 19 20 21 阅读全文
posted @ 2023-12-24 11:40 小鲨鱼2018 阅读(39) 评论(0) 推荐(0)
摘要:001、测试数据,,匹配末尾为_一个数字的数据 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 NC_052532.1 tRNAscan-SE TRNAD-GUC_1 NC_052532.1 tRNAscan-SE TRN 阅读全文
posted @ 2023-12-24 10:19 小鲨鱼2018 阅读(114) 评论(0) 推荐(0)
摘要:001、测试数据及匹配指定规则电话号码 [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 13783120433 16 17 18 19 20 21 22 阅读全文
posted @ 2023-12-24 10:15 小鲨鱼2018 阅读(478) 评论(0) 推荐(0)
摘要:001、简单测试 [root@pc1 test01]# str1=ab ## 测试字符串 [root@pc1 test01]# str2=xy [root@pc1 test01]# echo $str1 ## 测试字符串 ab [root@pc1 test01]# echo $str2 xy [ro 阅读全文
posted @ 2023-12-12 14:46 小鲨鱼2018 阅读(1085) 评论(0) 推荐(0)
摘要:001、创建数组(三种方法)(下标连续数组和下标不连续数组) a、利用小括号生成,各个元素之间使用空格间隔 [root@pc1 test01]# ay1=(111 222 aaa bbb) ## 生成普通数组 [root@pc1 test01]# echo ${ay1[*]} ## 访问数组的全部元 阅读全文
posted @ 2023-12-12 10:37 小鲨鱼2018 阅读(462) 评论(0) 推荐(0)
摘要:001、./configure 命令报错如下: No package 'glib-2.0' found 002、查找改文件 [root@pc1 exonerate-2.4.0]# find / -name "glib-2.0.pc" ## 只在conda环境中存在 /root/anaconda3/p 阅读全文
posted @ 2023-11-27 11:03 小鲨鱼2018 阅读(981) 评论(0) 推荐(0)
摘要:01、pkg-config 命令搜索的默认路径 a、/usr/lib/pkgconfig b、/usr/share/pkgconfig c、/usr/local/lib/pkgconfig c、/usr/local/share/pkgconfig d、/usr/lib64/pkgconfig/ 02 阅读全文
posted @ 2023-11-27 10:46 小鲨鱼2018 阅读(231) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 78 下一页