System Grab Bag

View all TLDR pages from Mac OS X (or from all pages)

wc

Count lines, words, or bytes. More information: https://ss64.com/osx/wc.html.
  • Count lines in file:
    wc -l {{path/to/file}}
  • Count words in file:
    wc -w {{path/to/file}}
  • Count characters (bytes) in file:
    wc -c {{path/to/file}}
  • Count characters in file (taking multi-byte character sets into account):
    wc -m {{path/to/file}}
  • Use stdin to count lines, words and characters (bytes) in that order:
    {{find .}} | wc

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.

Other Projects

This TLDR page is also found in other projects: