Skip to content

Instantly share code, notes, and snippets.

@fay
Created June 29, 2011 08:45
Show Gist options
  • Save fay/1053462 to your computer and use it in GitHub Desktop.
Save fay/1053462 to your computer and use it in GitHub Desktop.
常用命令
1. 虚拟IP。我一般用来linux和虚拟机之间共享用的,因为考虑到linux宿主机的ip是动态ip会变化。我所见到的实际用途是负载均衡。
sudo ifconfig eth1:0 125.12.12.77
2. windows根据 ip查看主机名,公司内部主机名一般会是ALIBABA-XXXXX,XXXXX就是工号,这样就可以找到对应的人,当然如果是隔日的,需要考虑动态IP的问题。
nbtstat -a IP
3. awk
awk -F ? {print $2}' //awk默认分隔符是空格,这里替换为?
4. 查看当前TCP连接情况:
netstat -an | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'\
5. git shortlog --numbered --summary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment