摘要: umount -lf /mnt 强制卸载文件 -f Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.) -l Lazy unmount. Detach the filesy 阅读全文
posted @ 2017-09-15 21:48 滴滴滴 阅读(5936) 评论(0) 推荐(0) 编辑
摘要: #创建账号 分组不分组只有一列useradd无法添加三个账号 添加账号 获取密码 执行最后一句echo stu{4..6}|xargs -n 1|sed -r 's#(.*)#useradd \1;pass=$(date +%N|md5sum|cut -c 5-13);echo ${pass}|pa 阅读全文
posted @ 2017-09-15 21:16 滴滴滴 阅读(971) 评论(0) 推荐(0) 编辑
摘要: [root@ob2 mytmp]# cat aa2.txt|sed 's#[a-z]#\u&#g'ETH0 LINK ENCAP:ETHERNET HWADDR 00:0C:29:2B:B9:55 INET ADDR:192.168.79.130 BCAST:192.168.79.255 MASK: 阅读全文
posted @ 2017-09-14 19:27 滴滴滴 阅读(4679) 评论(0) 推荐(0) 编辑
摘要: [root@ob2 mytmp]# find -mtime -7 -type f \( -name "*.html" -o -name "*.tar.gz" \)./02.html./03.html./tp_2017-09-143516.tar.gz./01.html 括号和代码间有空格 [root 阅读全文
posted @ 2017-09-14 17:22 滴滴滴 阅读(626) 评论(0) 推荐(0) 编辑
摘要: [root@ob2 mytmp]# find -type f -name "*.html" -or -name "*.txt"./02.html./aa.html./03.html./01.html./aa2.txt[root@ob2 mytmp]# find -type f -name "*.ht 阅读全文
posted @ 2017-09-14 16:56 滴滴滴 阅读(745) 评论(0) 推荐(0) 编辑
摘要: 1.1.1 统计使用命令最多的20条 [root@ob1 ~]# history|awk '{ml[$2]++}END{for (i in ml) print i,ml[i]}'|sort -nrk 2|head -20 ps 20 grep 12 man 10 jobs 9 [root@ob1 ~ 阅读全文
posted @ 2017-09-14 16:13 滴滴滴 阅读(657) 评论(0) 推荐(0) 编辑
摘要: 1.1.1 获取日志的最大top10,排序 获取两列到新的文件中第一次处理 sed截取字符串中间的内容,sed不支持贪婪匹配.找出图片在的列和图片大小到test1文件 本题需要输出三个指标:【访问次数】【访问次数*单个文件大小】【文件名(可以带URL)】 测试数据 59.33.26.105 --[0 阅读全文
posted @ 2017-09-14 16:08 滴滴滴 阅读(274) 评论(0) 推荐(0) 编辑
摘要: [root@ob2 mytmp]# ls01.txt 02.txt 03.txt aa2.txt aa.sh aa.txt tp_2017-09-143516.tar.gz tt [root@ob2 mytmp]# rename .txt .html ??.txt[root@ob2 mytmp]# 阅读全文
posted @ 2017-09-14 16:05 滴滴滴 阅读(358) 评论(0) 推荐(0) 编辑
摘要: cat aa.txt|tr "[a-z]" "A-Z" [root@ob2 mytmp]# awk '{print toupper($0)}' aa2.txt ETH0 LINK ENCAP:ETHERNET HWADDR 00:0C:29:2B:B9:55 INET ADDR:192.168.79 阅读全文
posted @ 2017-09-14 15:55 滴滴滴 阅读(2491) 评论(0) 推荐(0) 编辑
摘要: 1.1.1 shell脚本中&&\意思是前一个脚本中正常执行了后一个才执行. &&\表示前一个执行后正常了后一个才会执行. 阅读全文
posted @ 2017-09-14 15:09 滴滴滴 阅读(2695) 评论(0) 推荐(1) 编辑