Last active
December 19, 2018 06:23
-
-
Save vansosnin/71f58e7b2b5549bc1ec557cca94cb8ab to your computer and use it in GitHub Desktop.
Count stuff in bash and powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./path/to/dir -mindepth 1 -type f -name "*.js" | wc -l # count files | |
find ./path/to/dir -mindepth 1 -type f -name "*.js" -exec cat {} + | wc -l # count lines | |
dir -Recurse *.txt | Get-Content | Measure-Object -Line # powershell count lines | |
Get-Childitem c:\local -Recurse | where { -not $_.PSIsContainer } | group Extension -NoElement | sort count -desc # powershell count files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment