Re: Counting lines including subdirectories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Matt,

Matt Arnilo S. Baluyos (Mailing Lists) wrote:
Hello everyone,

Would anyone know of a one-liner that allows you to count the number
of lines including the subdirectories? I'm trying to find out how many
lines of code there are in a web application.

It would also be better if it has an option to exclude specific file extensions.


apprich@elmstreet schrott $ rpm -qip sloccount-2.26-1.i386.rpm
Name        : sloccount                    Relocations: /usr
Version     : 2.26                              Vendor: David A. Wheeler
Release : 1 Build Date: Sun 01 Aug 2004 08:56:10 PM CEST
Install Date: (not installed)               Build Host: Esther
Group : Development/Tools Source RPM: sloccount-2.26-1.src.rpm
Size        : 359300                           License: GPL
Signature   : (none)
Packager    : David A. Wheeler <dwheeler@xxxxxxxxxxxx>
URL         : http://www.dwheeler.com/sloccount
Summary     : Measures source lines of code (SLOC) in programs
Description :
SLOCCount (pronounced "sloc-count") is a suite of programs for counting
physical source lines of code (SLOC) in potentially large software systems
(thus, SLOCCount is a "software metrics tool" or "software measurement tool").
SLOCCount can count physical SLOC for a wide number of languages;
listed alphabetically, they are: Ada, Assembly, awk, Bourne shell, C, C++,
C shell, COBOL, Expect, Fortran, Java, lex/flex, LISP (including Scheme),
Modula-3, Objective-C, Pascal, Perl, PHP, Python, sed, TCL, and Yacc.
SLOCCount can automatically determine if a file
is a source code file or not, and if so, which language it's written in.
As a result, you can analyze large systems completely automatically;
it's been used to examine entire GNU/Linux distributions, for example.
SLOCCount also includes some report-generating tools
to collect the data generated and present it in several different formats.
Normally you can just run "sloccount DIRECTORY" and all the source code
in the directory and its descendants will be counted.

maybe this is what you are looking for.

Hth

Alex


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux