分类导航

最新文章

按月份

  1. 在apache的log中找出访问次数最多的N个IP。

    根据需求修改文件名和行数即可 awk ‘{print $1}’ 日志文件名 |sort |uniq -c|sort -nr|head -行数 输出: 1234 123.456.789.0 321 11.22.33.44 56 22.33.44.55 34 33.44.55.66 ……

    http://codante.org/apache-log-top-ip-statistics
  2. 根据端口查找进程pid

    netstat -lnp|grep 端口号|grep -v grep|sed -n ’1p’|awk ‘{print $7}’|awk -F/ ‘{print $1}’

    http://codante.org/linux-shell-find-pid-from-port
  3. tar命令不完全总结

    tar命令详细的介绍与测试,包括排除式打包、增量备份等实际操作。

    http://codante.org/tar-command-not-fully-sum-up