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 …

duplicate selective acknowledgement

$cat /proc/sys/net/ipv4/tcp_dsack 1 $ tcp_dsack – BOOLEAN Allows TCP to send “duplicate” SACKs. This option is required to send duplicate SACKs which was briefly described in the tcp_sack variable explanation. This is described in detail within the RFC 2883. This RFC document explains in detail how to handle situations where a packet is received twice …

size of socket reads that will be offloaded to a DMA copy engine

$cat /proc/sys/net/ipv4/tcp_dma_copybreak 4096 $ tcp_dma_copybreak – INTEGER Lower limit, in bytes, of the size of socket reads that will be offloaded to a DMA copy engine, if one is present in the system and CONFIG_NET_DMA is enabled. Default: 4096 grepping through linux kernel source 2.6.32 sysctl_net_ipv4.c: .procname = “tcp_dma_copybreak”,

congestion control algorithm to be used for new connections

ahiliation:~$cat /proc/sys/net/ipv4/tcp_congestion_control cubic ahiliation:~$echo reno > /proc/sys/net/ipv4/tcp_congestion_control bash: /proc/sys/net/ipv4/tcp_congestion_control: Permission denied ahiliation:~$su – Password: debianlabs:~# echo reno > /proc/sys/net/ipv4/tcp_congestion_control debianlabs:~# cat /proc/sys/net/ipv4/tcp_congestion_control reno debianlabs:~# echo dreno > /proc/sys/net/ipv4/tcp_congestion_control -su: echo: write error: No such file or directory Set the congestion control algorithm to be used for new connections. The algorithm “reno” is always available, but …