会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
todayORtomorrow
博客园
首页
新随笔
联系
管理
订阅
2019年8月14日
find排除某个固定查找目录
摘要: find ./ -path 排除目录 -prune -o -name "*"
阅读全文
posted @ 2019-08-14 11:05 todayORtomorrow
阅读(428)
评论(0)
推荐(0)
2019年5月10日
同步文件到其它服务器上
摘要: if[! -f ip.txt];then exit fi if[-z "$1"];then exit fi count=`cat ip.txt|wc -l` rm -rf ip.txt.swp i=0 while((i<$count)) do i=`expr $i +1` sed"${i}s/^/&
阅读全文
posted @ 2019-05-10 17:02 todayORtomorrow
阅读(290)
评论(0)
推荐(0)
统计访问IP次数,防火墙过滤
摘要: IP_ADDR=`tail -n 100 /var/log/secure |grep "Failed password"| egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}"|sort -nr|uniq -C|awk '$1>=10 {print $2}'` IPTABLE
阅读全文
posted @ 2019-05-10 16:38 todayORtomorrow
阅读(590)
评论(0)
推荐(0)
2019年4月19日
显示当前路径
摘要: bin=`dirname "$0"`bin=`cd "$bin"; pwd` . /home/d50001/ZHBR/opensource/hadoop-1.0.4/hadoop-1.0.4/bin
阅读全文
posted @ 2019-04-19 14:02 todayORtomorrow
阅读(186)
评论(0)
推荐(0)
2019年4月18日
取IP地址ifconfig eth0 | sed -nr '2s#^.*dr:(.*) Bc.*$#\1#gp'
摘要: ifconfig 279 17:28 ifconfig eth0 280 17:29 ifconfig eth0 | sed -n '2p' 281 17:31 ifconfig eth0 | sed -n '2p' | sed 's#inet addr:##g' 282 17:32 ifconfi
阅读全文
posted @ 2019-04-18 17:09 todayORtomorrow
阅读(636)
评论(0)
推荐(0)
egrep
摘要: egrep "god|good" ll.txt egrep "g(oo|al)d" ll.txt
阅读全文
posted @ 2019-04-18 16:18 todayORtomorrow
阅读(101)
评论(0)
推荐(0)
2019年3月11日
sudo
摘要: visudo 可以给用户添加命令权限(vi /etc/sudoers ) -c 可以检查添加到sudoers文件的语法 mm ALL=(ALL) NOPASSWD:ALL
阅读全文
posted @ 2019-03-11 21:55 todayORtomorrow
阅读(141)
评论(0)
推荐(0)
2019年3月10日
getenforce setenforce
摘要: SELINUX
阅读全文
posted @ 2019-03-10 21:54 todayORtomorrow
阅读(137)
评论(0)
推荐(0)
uname
摘要: -a, --all print all information, in the following order, except omit -p and -i if unknown: -s, --kernel-name print the kernel name -n, --nodename prin
阅读全文
posted @ 2019-03-10 21:40 todayORtomorrow
阅读(109)
评论(0)
推荐(0)
seq
摘要: seq 14 打印序列 echo {1..8} /{a..n} 打印序列 mkdir stu {1..8}
阅读全文
posted @ 2019-03-10 21:36 todayORtomorrow
阅读(151)
评论(0)
推荐(0)
下一页
公告