Mostly Linux & Python syntax notes and hyperlinks.

Wednesday, August 6, 2014

Linux: find and print the contents of files matching a pattern

find . -iname foo* -exec cat '{}' \;  | more  
To print the name before the printing the file contents:  
find . -iname foo* -print -exec more '{}' \; | more

No comments:

Post a Comment