grep -Z

from grep manual in debian. Output a zero byte (the ASCII NUL character) instead of the character that normally follows a file name $grep -Z FACK * proc.c SNMP_MIB_ITEM(“TCPFACKReorder”, LINUX_MIB_TCPFACKREORDER), sysctl_net_ipv4.c .ctl_name = NET_TCP_FACK, tcp_input.c * Packet counting of FACK is based on in-order assumptions, therefore TCP tcp_input.c mib_idx = LINUX_MIB_TCPFACKREORDER; tcp_input.c * A”. Its …

Enable FACK congestion avoidance

$cat /proc/sys/net/ipv4/tcp_fack 1 $ tcp_fack Enable FACK congestion avoidance and fast retransmission. The value is not used, if tcp_sack is not enabled. http://www.psc.edu/networking/ftp/papers/Fack.9608.ps grepping through the linux kernel source 2.6.32 proc.c:210: SNMP_MIB_ITEM(“TCPFACKReorder”, LINUX_MIB_TCPFACKREORDER), sysctl_net_ipv4.c:475: .procname = “tcp_fack”, tcp_input.c:847: * Packet counting of FACK is based on in-order assumptions, therefore TCP tcp_input.c:1029: * A”. Its FACK …

grep –color

$cat textdomain.c #include #include main() { char *textd; textd=textdomain(“iam happy”); printf(“\n %s \n”,textd); } $grep –color=auto hello textdomain.c $grep –color=auto happy textdomain.c textd=textdomain(“iam happy”); $

grep -n ,-v , -c, -i

$grep -n root /etc/passwd 1:root:x:0:0:root:/root:/bin/bash $ $cat hello.txt hello world $grep -v hello hello.txt world $ $cat hello.txt hello world helloo $grep -c hello hello.txt 2 $grep -c helloo hello.txt 1 $ $cat hello.txt hello world helloo Hello $grep hello hello.txt hello helloo $grep -i hello hello.txt hello helloo Hello $

grep ? (regex)

from grep info. GNU FDL `?’ The preceding item is optional and will be matched at most once. $cat bu.txt bugy buggy bugggy $ $grep -E bug\?y bu.txt bugy $grep -E bugg\?y bu.txt bugy buggy $grep -E buggg\?y bu.txt buggy bugggy $

terminfo is a database of terminal capabilities

$cd /lib/terminfo/ $ls a c d E h l m p r s v w x $pwd /lib/terminfo $cd l/ $infocmp linux $infocmp linux # Reconstructed via infocmp from file: /lib/terminfo/l/linux linux|linux console, am, bce, ccc, eo, mir, msgr, xenl, xon, colors#8, it#8, ncv#18, pairs#64, Terminfo (formerly Termcap) is a database of terminal capabilities and …