calculate the total line numbers of files in directory
I want to calulate the total line numebers of the files(*.h *.cpp) in certain directory(include its subdirecories).
How to I write the command?
cat ./tmp/*.h | wc -l
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32
Quote: Original post by Trenki
maybe wc -l `find -iname "*.h"`
The command you written does not work.
cat a/*.h a/*.cpp | wc -l
but cannot include the subdirectories.
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32
<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement