find grep查找文件 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

  如果你想要搜索所有的,某一类文件里,如 .txt文件下是否包含'hello'可以用

  grep -D skip --include=*.txt -n -R -e 'hello' /

  后面的/可以改为你想要搜的目录名如/us

  find用法

  查找某个文件

  find / (.) -name 文件名字 /表示root目录 一般用户可能会遇到权限限制问题,.表示当前目录

  find . -size 50000c查找文件大小为50000byte的文件

  find . -size +4000c查找文件大小超过4000byte的文件

  find . -atime -2 查找两天前的文件

  find . -amin -10查找10分钟前的文件

最新文章