在文件中查找字符串:

1
grep words document*

查找包含特定字符的文件名:

1
2
3
4
5
6
7
find /path -name "*word*"

# file only
find /path -type f -name "*word*"

# case insensitive
find /path -iname "*word*"