find -name 那個文件的可能名稱,可用*替代任何字符。
找文件名及其內容:
find . -name "*.conf" -exec grep -H "config_value" {} \
專門查找文本文件及內容:
find . -type f -name "*NERDTree*" -exec file {} \; | grep 'text' | cut -d: -f1 | xargs grep -I -l "ejsoon"
只找文本文件的文件名:
find . -type f -name "*NERDTree*" -exec file {} \; | grep 'text' | cut -d: -f1
直接找內容,不管文件名:
find . -type f -exec file {} \; | grep 'text' | cut -d: -f1 | xargs grep -l "ejsoon"