Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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 Java 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 7 API documentation
- My blog about Scala
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.
rocket mass heater
subject: Command to count the lines of code
How to get // and /* symbols out of tokens?
Head First Object Exercise Chapter Two
Understanding Nested For Loops
Why does it not compile ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013