Subscribe to RSS Subscribe to Comments

Programming stuff: Bash, Linux, SQL and Java

How to count the number of lines

The number of lines in a file
wc -l filename
If you have many files in a folder and you want to count all lines in all files you do:
cat ./*.* | wc -l
or just the log files:
cat ./*.log | wc -l

No comments yet. Be the first.

Leave a reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

Based on FluidityTheme Redesigned by Kaushal Sheth Sponsored by Send Flowers