mirror of
https://github.com/jlengrand/jlengrand.github.io.git
synced 2026-03-10 08:31:22 +00:00
867 B
867 B
layout, status, published, title, author, author_login, author_email, author_url, wordpress_id, wordpress_url, date, categories, tags, comments
| layout | status | published | title | author | author_login | author_email | author_url | wordpress_id | wordpress_url | date | categories | tags | comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| post | publish | true | Count the number of lines of code of your projects | Julien Lengrand-Lambert | jlengrand | julien@lengrand.fr | http://www.lengrand.fr | 605 | http://www.lengrand.fr/?p=605 | 2012-05-22 12:40:04.000000000 +02:00 |
|
|
After having finished a project, I always like to know its actual size. It does not give any value to my work, but it is always fun to see :)
I found this simple command that will pop out the number of lines of code for a given file extension.
{% highlight bash %}
cat find . -name "*.py" | wc -l
{% endhighlight %}
You can also do it for a whole folder
{% highlight bash %}
find . -name "*.py" | xargs wc -l
{% endhighlight %}