LINUX的搜索 查找 读取

命令 解释 示例
tail 从文件尾部开始读取 tail -f test
head 从文件头部开始读取 head test
cat 读取整个文件 cat test
more 分页读取 more test
less 可控分页 less test
grep 搜索关键字 grep "11" test
find 查找文件

find . -name "*.text" 

find . -type  f (文件)  d(目录)

find . -ctime -20 (20天内修改过的文件)

wc 统计个数

cat test | wc -l

grep "11" | wc -l

tar 解压缩

 查看操作手册:man tar 

 压缩文件:tar -cf test.tar test

 解压文件:tar -xf test.tar

 查看压缩文件有什么文件:tar -tvf test.tar

 

 

 

详细请见:http://www.runoob.com/linux/linux-tutorial.html

posted @ 2019-03-05 15:40  dugujiujian  阅读(120)  评论(0编辑  收藏  举报