操作系统-linux
Remindyou_up
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
secureCRT快捷键
ctrl+c 结束进程ctrl+shift+c 复制ctrl+shift+v 粘贴ctrl+d 登出(logout)原创 2016-12-17 13:59:47 · 569 阅读 · 0 评论 -
systemctl用法
对比表,以 apache / httpd 为例任务旧指令新指令使某服务自动启动chkconfig --level 3 httpd onsystemctl enable httpd.service使某服务不自动启动chkconfig --level 3 httpd offsystemctl disable httpd.service转载 2017-01-06 23:54:36 · 328 阅读 · 0 评论 -
iptables dnat snat详解
DNAT target 这个target是用来做目的网络地址转换的,就是重写包的目的IP地址。如果一个包被匹配了,那么和它属于同一个流的所有的包都会被自动转换,然后就可以被路由到正确的主机或网络。DNAT target是非常有用的。比如,你的web服务器在LAN内部,而且没有可以在Internet上使用的真实IP地址,那就可以使用这个target让防火墙把所有到它自己HTTP端口的包转载 2017-01-08 21:56:40 · 378 阅读 · 0 评论 -
进程监控脚本程序
脚本名demo.sh#!/bin/shecho "$#"while [ 1 ]dopidof $1if [ $? != 0 ]then echo "$1 is not run! Now begin to run..." ./hello1 & #监控的应用程序 路径else echo "$1 is running."fipidof转载 2017-04-09 22:31:40 · 260 阅读 · 0 评论 -
iptables知识点
iptables -A INPUT -s ! 1.1.1.1 -j DROP不等于iptables -A INPUT -s 1.1.1.1 -j ACCEPT区别如下:iptables -A INPUT -s ! 1.1.1.1 -j DROP如果源地址是1.1.1.1,则匹配此规则失败,继续匹配下一条;如果不是1.1.1.1,则匹配成功,数据包drop!i原创 2017-04-20 21:38:27 · 646 阅读 · 0 评论 -
shell脚本for循环知识
取cat file.txt中的每一行进行for循环for line in $(cat file.txt);do echo $linedone应用例子:用shell脚本循环将111.txt中的ip添加到ipset list,代码如下:#!/bin/shfor line in $(cat 111.txt);do ipset add blackip $lin原创 2017-04-22 14:15:46 · 601 阅读 · 0 评论 -
case用法(枚举条件选择)
使用case(枚举条件选择)就能够实现#!/bin/bashecho "1. China"echo "2. USA"echo "3. England"read -p "Please choose your country: " icase "$i" in 1) echo "Your country is China." ;; 2)转载 2017-04-22 14:17:47 · 1471 阅读 · 0 评论
分享