• Skip to main content
  • Skip to primary sidebar

Founder at work

Master the skills to create and launch your next SaaS company

  • About Me
  • Reviews
  • Resources
  • Community
  • Contact
  • Lessons
  • Series
  • Search
  • Login

How to count all the words in a directory recursively?

November 10, 2013 by Rick Hernandez Leave a Comment

Find the location that you want to search in, change into that location.

wc -w **/*.md

This will do a word count recursively over the directory and count all the words in files with the extension of .md.

How to count how many lines are in a git project?

The following will print out all the line numbers in
the entire project just cd into the directory.

git ls-files | xargs cat | wc -l

But hold on, I want to see how many lines are in each file
and then show me the complete number of lines of code.

No problem!

wc -l $(git ls-files)

Rick Hernandez

I always had a passion for the field of STEM (Science, Technology, Engineering, and Math) and I knew I wanted to do something to make a difference in the world. I just didn’t know where to start. I was an immigrant in a new country, grew up in a tough environment, and wasn’t sure how… Read More

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

Filed Under: Programming, Software Engineering

Primary Sidebar

Learn How To Take Your Idea And Convert It Into An App From Scratch Even If You Have Never Written A Single Line Of Code.

  • How to Find Your Next Great App Idea
  • The Secret To Getting PAID To Build Your Own App
  • How To Create Your App (SaaS, Mobile, VR, AR, Game)
  • How To Monetize Your Apps
Learn More
4.82 Ratings

Copyright © 2025 · JSecademy Blog Theme on Genesis Framework · WordPress · Log in