yours, tiramisu

how to check total wordcount across all files in a folder

Mac

In the directory one level above the folder in question:

find INSERTFOLDERNAMEHERE/ -type f -print0 | xargs -0 wc -w | tail -1

For a total itemized list:

find INSERTFOLDERNAMEHERE/ -type f -print0 | xargs -0 wc -w

Windows

In powershell, run this command in the directory you want to check and change the file extension if desired (.txt for plain text).

dir -Recurse -Include *.md| Get-Content | Measure-Object -Word

This will give you the total number of words across all markdown files in this folder (including all those in subfolders).

Big thanks to my friend Arth for helping me with this!

(source)

#english #utils