Subj : Re: Getting the number of lines in a file To : alt.os.linux,comp.os.linux,alt.os.linux.mandrake From : ptb Date : Fri Jul 23 2004 08:50 pm In alt.os.linux John Cholewa wrote: > > find . -type f | sed 's/$/"/;s/^/"/' | xargs wc -l > > Done this way, "wc" is given all the files on the same line, and when that > happens, wc gives a total. This may puke if you have a few thousand or more > files in your project, though. Also, the "sed" stuff is there to put quotes > around the file names, just in case there are spaces in any of them. That's not necesary. The convention is to go find . -type f -print0 | xargs -0 wc -l if you are really concerned about whitespace (not just spaces) in names. You might want to remove empty lines and lines which contain only comments. Peter .