There are multiple ascii files in a directory tree with arbitrary depth, for instance:
$HOME/file1.txt
$HOME/dir_1/.../dir_n/file_b.txt
......
......
$HOME/yyy_1/.../yyy_m/file_a.txt
How can I write a unix script to grep a string, say 'this string', from the directory tree listed above?
Note: I don't know how many sub-directories under $HOME, nor do I know the filenames and directory names. But I need to grep a given string from all files under $HOME.
Many thanks!
$HOME/file1.txt
$HOME/dir_1/.../dir_n/file_b.txt
......
......
$HOME/yyy_1/.../yyy_m/file_a.txt
How can I write a unix script to grep a string, say 'this string', from the directory tree listed above?
Note: I don't know how many sub-directories under $HOME, nor do I know the filenames and directory names. But I need to grep a given string from all files under $HOME.
Many thanks!