摘要: 1、直接使用type命令进行判断 [root@localhost test]# type pwd ## pwd是内部命令 pwd is a shell builtin [root@localhost test]# type plink ## plink是外部命令 plink is hashed (/ 阅读全文
posted @ 2022-03-27 22:17 小鲨鱼2018 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1、创建别名命令 [root@localhost test]# pwd /home/test [root@localhost test]# abc bash: abc: command not found... [root@localhost test]# alias abc=pwd ## 创建别名 阅读全文
posted @ 2022-03-27 22:06 小鲨鱼2018 阅读(1019) 评论(0) 推荐(0) 编辑
摘要: 双引号“”:不进行转义,保留变量属性。 单引号‘’:进行转义,使其成为单纯的字符串。 [root@localhost test]# A=10 [root@localhost test]# echo $A 10 [root@localhost test]# echo "number is $A" ## 阅读全文
posted @ 2022-03-27 21:51 小鲨鱼2018 阅读(3204) 评论(0) 推荐(0) 编辑
摘要: ?:表示匹配任意一个。 *:表示匹配0个或任意多个 [root@localhost test]# ls ab ab1 ab12 ab123 [root@localhost test]# ls -l ab* ## *表示匹配0个或任意多个 -rw-r--r--. 1 root root 0 Mar 2 阅读全文
posted @ 2022-03-27 21:40 小鲨鱼2018 阅读(825) 评论(0) 推荐(0) 编辑
摘要: 1、redhat(centos)中 [root@localhost Desktop]# hostnamectl Static hostname: localhost.localdomain Icon name: computer Chassis: n/a Machine ID: 7dcb3b04ae 阅读全文
posted @ 2022-03-27 20:40 小鲨鱼2018 阅读(1272) 评论(0) 推荐(1) 编辑
摘要: 1、标准输出重定向:1>, 1可以省略 root@ubuntu01:/home/test# ls a.txt root@ubuntu01:/home/test# ls -l a.txt -rw-r--r-- 1 root root 6 3月 27 19:52 a.txt root@ubuntu01: 阅读全文
posted @ 2022-03-27 19:58 小鲨鱼2018 阅读(776) 评论(0) 推荐(0) 编辑
摘要: 1、在当前路径直接查找 root@ubuntu01:/home/test# ls 01.txt 02.csv 02.txt 03.csv 04.txt root@ubuntu01:/home/test# find 02.csv 02.csv root@ubuntu01:/home/test# fin 阅读全文
posted @ 2022-03-27 17:57 小鲨鱼2018 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 root@ubuntu01:/home/test# ls outcome.map outcome.ped root@ubuntu01:/home/test# ll -h total 80M drwxr-xr-x 2 root root 4.0K 3月 27 15:58 ./ drwxr 阅读全文
posted @ 2022-03-27 16:02 小鲨鱼2018 阅读(1294) 评论(0) 推荐(0) 编辑
摘要: 1、问题 -bash: unrar: command not found 2、系统 root@ubuntu01:/home/test# hostnamectl Static hostname: ubuntu01 Icon name: computer-vm Chassis: vm Machine I 阅读全文
posted @ 2022-03-27 15:51 小鲨鱼2018 阅读(5400) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 root@PC1:/home/test2# ls a.txt b.txt c.txt root@PC1:/home/test2# md5sum a.txt b.txt c.txt 3b0332e02daabf31651a5a0d81ba830a a.txt 3b0332e02daabf 阅读全文
posted @ 2022-03-27 15:41 小鲨鱼2018 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 root@ubuntu01:/home/test# ls a.txt root@ubuntu01:/home/test# stat a.txt File: a.txt Size: 15 Blocks: 8 IO Block: 4096 regular file Device: 805h 阅读全文
posted @ 2022-03-27 14:30 小鲨鱼2018 阅读(709) 评论(0) 推荐(0) 编辑
摘要: 1、使用stat命令获取atime、mtime、ctime root@ubuntu01:/home/test# ls a.txt root@ubuntu01:/home/test# stat a.txt File: a.txt Size: 10 Blocks: 8 IO Block: 4096 re 阅读全文
posted @ 2022-03-27 12:19 小鲨鱼2018 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1、问题 root@ubuntu01:/home/test# ls a.txt root@ubuntu01:/home/test# stat a.txt ## 统计a.txt最后访问的时间 File: a.txt Size: 10 Blocks: 8 IO Block: 4096 regular f 阅读全文
posted @ 2022-03-27 12:06 小鲨鱼2018 阅读(481) 评论(0) 推荐(0) 编辑