Monday, April 23, 2012

To find out lines of codes in a source code directory

Use:

find ./name-of-dir '*.php' | xargs wc -l
 
OR
 
( find ./name-of-dir -print0 | xargs -0 cat ) | wc -l 
 
ref: link 

No comments:

About Me

My photo
Jaison Paul Mulerikkal is the Vice Principal of Rajagiri School of Engineering and Technology (RSET), Kochi. He was the Principal of Jyothi Engineering College (JEC), Cheruthuruthy, Trissur, India. He is a member of CMI Sacred Heart Province, Kochi. He is a civil engineer by profession, but did his Masters in Information Systems from RMIT University, Melbourne, Australia and subsequently received his PhD in High Performance Scientific Computing from the Australian National University. He had worked as a computational scientist at the University of Auckland, New Zealand.