linux shell
文章平均质量分 81
记录
Oui.
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Linux环境配置
注:运行bash的时候,就已经进入到交互式命令当中,可以多次进入,退出用exit就可以。:国内云服务提供商提供了很多镜像,方便从海外下载开发工具。原创 2022-11-09 00:55:04 · 538 阅读 · 0 评论 -
bash小练习>抽奖
[root@moli tmp]# cat wx.txt小可爱王可爱小夹子小李子亲爱的思随机幻er天量的[root@moli tmp]# cat lottery.sh#! /bin/bash# 定义一个函数rand(){ # local定义局部变量 # 使用 ..代替空格 local seeds=`while read line;do echo ${line// /..}; done < wx.txt` loca原创 2020-11-29 00:48:52 · 217 阅读 · 1 评论 -
性能统计分析
性能分析原创 2020-11-28 22:36:15 · 533 阅读 · 0 评论 -
Linux:grep+awk+sed
1、grep和正则玩[root@moli tmp]# grep -nvE r+ b.txt // grep和扩展正则玩的时候 需要加上-E4:dchjdewi2、双引号和单引号的区别双引号会对字符串转义 # a=10 echo “$a” 打印103、...原创 2020-11-28 18:25:20 · 388 阅读 · 0 评论 -
cji
1、cig:公共网关接口2、工具Centos 7epel-release // 需要先安装这个源curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repoyum install -y nginx fcgiwrapUbantu 18:apt install -y nginx fcgiwrap // -y表示同意 fcgiwrap是cgi实现3、fcgiwrap.原创 2020-11-22 21:34:31 · 525 阅读 · 0 评论 -
linux常用统计命令
1、统计内存的使用#! /bin/bashfor i in `ps aux | awk '{print $6}' | grep -v 'RSS'`;do count=$[$count+$i];doneecho "$count/kb"2、curl 服务器传送发送命令# 支持的协议: DICT、FILE、FTP、FTPS、GOPHER、HTTP、HTTPS、IMAP# 没有用户交互...原创 2020-11-22 02:33:33 · 469 阅读 · 0 评论 -
bash shell
1、常用shellBourne Shell (/usr/bin/sh或/bin/sh)Bourne Again Shell (/bin/bash)常见、易用、免费C Shell (/usr/bin/csh)K Shell (/usr/bin/ksh)Shell for Root (/sbin/sh)2、bash shell脚本栗子#! /bin/bashecho "hello!"3、运行shellchmod + x ./test.sh #使脚本具有执行权.原创 2020-11-22 01:04:13 · 129 阅读 · 0 评论 -
linux文件属性
[root@moli tmp]# lltotal 4-rwxr-xr-x 1 root root 27 Nov 21 14:06 a.sh1、文件属性从左到右依次是权限属性文件类型d:目录-:文件l:连接文件b:设备文件c:设备文件中的串行端口设备,如:键盘、鼠标rwx:拥有者:r可读,w可写,x可执行,简称:可读可写可执行r-x:所属组:可读可执行r-x:其他人:可读可执行连接数所有者用户组大小修改日期文件或者目录名2、修改文件属性原创 2020-11-21 18:16:57 · 636 阅读 · 0 评论 -
正则表达式
1、正则表达式:就是记录文本规则的代码2、常用的元字符. 匹配除换行符以外的任意字符\w 匹配字母或数字或下划线或汉字\s 匹配任意空白符\d 匹配数字\b 匹配单词的开始或结束^ 匹配字符串的开始$ 匹配字符串的结束3、常用的限定符* 重复零次或更多次+ 重复一次或更多次? 重复零次或一次{n} 重复n次{n,} 重复n次或更多次{n, m} 重复n到m次2、栗子\bhi\b //找到所有hi单词.原创 2020-11-21 18:16:27 · 160 阅读 · 0 评论 -
linux常用命令(一)
cd:进入[root@moli ss]# cd - // 回到之前的文件路径ls:列表查看[root@moli ss]# ls // 列出目录下所有内容[root@moli ss]# ls -l // 以列表形式打印目录下的内容,缩写 ll[root@moli tmp]# ls -ld b.txt // 查看指定文件属性-rwxrwxrwx 1 root root 0 Nov 21 14:3原创 2020-11-21 18:15:10 · 1462 阅读 · 0 评论
分享