9 replies
by alpha-male
This should help:
http://www.computerhope.com/unix/ugrep.htm
http://www.geocities.com/tipsforlinux/articles/25.html
Delete any spaces in the URLs.
Good luck!
by vjohnmoses
grep is similar to 'find' in windows
moses
by vjohnmoses
grep is similar to 'find' in windows
moses
by vjohnmoses
grep is similar to 'find' in windows
moses
by vjohnmoses
grep is similar to 'find' in windows
moses
by nex6
grep, allows you to "look" into files and filesystems:
here is an example:
[root@localhost nex6]# grep fw3 input
grep: input: No such file or directory
[root@localhost nex6]# grep INPUT fw3
iptables -P INPUT DROP
iptables -A INPUT -i eth0 -m state --state NEW -p tcp --destination-port 22 -j ACCEPT
#iptables -A INPUT -i eth0 -m state --state NEW -p tcp --destination-port 515 -j ACCEPT
#iptables -A INPUT -i eth0 -m state --state NEW -p tcp --destination-port 135:139 -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP
iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP
iptables -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
iptables -A INPUT -p tcp --tcp-flags FIN,RST FIN,RST -j DROP
iptables -A INPUT -p tcp --tcp-flags ACK,FIN FIN -j DROP
iptables -A INPUT -p tcp --tcp-flags ACK,PSH PSH -j DROP
iptables -A INPUT -p tcp --tcp-flags ACK,URG URG -j DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state INVALID -j LOG \
iptables -A INPUT -m state --state INVALID -j DROP
#iptables -A INPUT -i $INTERNET -p icmp \
#iptables -A INPUT -i $INTERNET -p tcp -d $IPADDR-j LOG
iptables -A INPUT -p tcp --dport 22 -j LOG
#iptables -A INPUT -i eth0 -j LOG
[root@localhost nex6]#
This is a grep of a sample iptables script is was playing with.
it works like this:
grep [string to match] file/filessystemHere is a thread with at ARS with lots of command examaples:
http://arstechnica.infopop.net/OpenTopic/page?q=Y&a=tpc&s=50009562&f=96509133&m=6020942225&p=1
-Nex6
by manish_rit21
by gtkfreak
Last one in... Always try:
$ man grep
Will give you all info you want.
$ info grep
will also work.
This discussion is closed to new replies.
Trending Linux posts
Sort by Trending