linux常用命令

1.简单问题:如何查看一个目录下的文件个数
find   ./   -type   d   |   wc   -l     (目录个数)  
  find   ./   -type   f   |   wc   -l     (文件个数)

2.打包压缩
tar -zcvf /tmp/etc.tar.gz /etc

3.解压缩
tar -zxvf /tmp/etc.tar.gz

tar使用的一篇不错的博文
http://www.21andy.com/blog/20060820/389.html
4.转换掉windows下不可见的控制符
dos2unix

5.-bash: dos2unix: Argument list too long
ls | xargs -n 10 dos2unix


posted on 2009-08-11 10:11  speedmancs  阅读(188)  评论(0编辑  收藏  举报

导航