The 'wc' command counts the number of lines, words or bytes in a file.
- Count lines (-l) in a file:
wc -l path/to/file
- Count words (-w) in a file:
wc -w path/to/file
- Count bytes in a file:
wc -c path/to/file
- Count characters (-m) in a file, taking multi-byte characters into account:
wc -m path/to/file
- Count lines, words, and bytes in a file:
wc path/to/file
- Count lines, words, and bytes from stdin:
cat path/to/file | wc
NOTE This is NOT a "useless use of cat" since the output is slightly different than 'wc file'.
- Get character length of the longest line in a file:
wc -L path/to/file
REFERENCED:
โบ https://gitlab.com/dwt1/vidman - Video Man Pages
WANT TO SUPPORT THE CHANNEL?
๐ฐ Patreon: https://www.patreon.com/distrotube
๐ณ Paypal: https://www.paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
๐๏ธ Amazon: https://amzn.to/2RotFFi
๐ Teespring: https://teespring.com/stores/distrotube
DT ON THE WEB:
๐ธ๏ธ Website: http://distro.tube
๐ GitLab: https://gitlab.com/dwt1
๐จ๏ธ Mastodon: https://fosstodon.org/@distrotube
๐ซ Reddit: https://www.reddit.com/r/DistroTube/
๐ฝ๏ธ Odysee: https://odysee.com/@DistroTube:2
FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
๐ Brave Browser - https://brave.com/
๐ฝ๏ธ Open Broadcaster Software: https://obsproject.com/
๐ฌ Kdenlive: https://kdenlive.org
๐จ GIMP: https://www.gimp.org/
๐ป VirtualBox: https://www.virtualbox.org/
๐๏ธ Doom Emacs: https://github.com/hlissner/doom-emacs
Your support is very much appreciated. Thanks, guys!
...
https://www.youtube.com/watch?v=ODkPRwd3l8w