Total Number of lines in the kernel code

Kaushal Shriyan kaushalshriyan at gmail.com
Fri Mar 28 01:21:28 EDT 2014


On Fri, Mar 28, 2014 at 9:04 AM, <Valdis.Kletnieks at vt.edu> wrote:

> On Fri, 28 Mar 2014 08:49:55 +0530, Kaushal Shriyan said:
>
> > How many lines of code and files and directories in the latest stable
> > kernel 3.13.7?
>
> find, xargs, and wc are your friends. For Linus's 'git' tree
> (3.14-rc8-ish):
>
> [/usr/src/linux] find * -type d | wc -l
> 2947
> [/usr/src/linux] find * -type f | wc -l
> 46016
> [/usr/src/linux] find * -type f -name '*.[ch]' | xargs cat | wc -l
> 16644991
>
> (Ignoring of course that there's other types of lines of code besides *.c
> and *.h.  If you don't like it, do your own find command :)
>
>
>
Thanks Valdis for the explanation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140328/6d26a3ee/attachment.html 


More information about the Kernelnewbies mailing list