File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Linux / UNIX
Command to count the lines of code
Joined: Jul 28, 2006
Feb 14, 2008 00:54:00
If you have to count the lines of code in all
programs in the directories under your home directory how would you do that?
Please help in finding out the solution
Thanks in advance
Joined: Mar 06, 2001
Feb 14, 2008 01:23:00
wc (word count) counts characters, words and lines, so "wc -l" can count the number of lines.
Jesper de Jong
Joined: Aug 16, 2005
Feb 14, 2008 01:52:00
And with a command like "find" you can find files, for example all *.java files in a certain directory:
find /home/divya -name *.java
See the man pages for these commands:
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 8 API documentation
Joined: Dec 20, 2007
Feb 14, 2008 15:14:00
Or you can download
. It supports different languages, easy to use and does everything for you.
It is sorta covered in the
JavaRanch Style Guide
subject: Command to count the lines of code
Head First Object Exercise Chapter Two
Why does it not compile ?
How to get // and /* symbols out of tokens?
Understanding Nested For Loops
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014