ITeye博客

LINUX命令

jackyIT · 2013-10-12 17:03 · 研发管理 · Markdown

netstat

列出某个端口{portno}的连接 

netstat -antp | grep {portno}| awk '{print $5}' | awk -F: '{print $4}' | sort | uniq

tcpdump

http://danielmiessler.com/study/tcpdump/ 

shell 脚本

参考手册
    http://tldp.org/LDP/abs/html/refcards.html#AEN22491 Linux_shell培训 
和]的区别
    http://mywiki.wooledge.org/BashFAQ/031 
<和<<和<<<的区别
    http://wiki.bash-hackers.org/syntax/redirection 
关联数组
    http://www.artificialworlds.net/blog/2012/10/17/bash-associative-array-examples/ 

awk

某列为某值为条件 

ps ax | grep scf | grep -v grep | awk '{ if ($5 == "java") {print} }'

往awk传bash中的数组 

awk -F',' -v bArr="${banIpArr}" 'bArr ~ $5'

ldconfig

更新cache 

ldconfig -n /opt/dummy/lib

#或者 vi /etc/ld.so.conf ldconfig

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。