Redirection and Pipelines

I haven't been able to find this file within my directories and heard that this was an easy way to do it, but I am new and do not understand how to do it.What command would i use produce a listing of the names of all the text files in a directory or its subdirectories (possibly several layers deep) followed immediately by the first line of text within that file? Thanks
On the command line,

find ~ -name "*.cpp" | xargs head -10

will find all my .cpp files starting from my home directory ~ and print out the first 10 lines of the source.
Last edited on
Topic archived. No new replies allowed.