Uploaded March 2026 | Updated November 2026, 4 days ago
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:
βΊ gitlab.com/dwt1/vidman - Video Man Pages
WANT TO SUPPORT THE CHANNEL?
π° Patreon: patreon.com/distrotube
π³ Paypal: paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
ποΈ Amazon: amzn.to/2RotFFi
π Teespring: teespring.com/stores/distrotube
DT ON THE WEB:
πΈοΈ Website: http://distro.tube
π GitLab: gitlab.com/dwt1
π¨οΈ Mastodon: fosstodon.org/@distrotube
π« Reddit: reddit.com/r/DistroTube
π½οΈ Odysee: odysee.com/@DistroTube:2
FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
π Brave Browser - brave.com
π½οΈ Open Broadcaster Software: obsproject.com
π¬ Kdenlive: kdenlive.org
π¨ GIMP: gimp.org
π» VirtualBox: virtualbox.org
ποΈ Doom Emacs: github.com/hlissner/doom-emacs
Your support is very much appreciated. Thanks, guys!
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:
βΊ gitlab.com/dwt1/vidman - Video Man Pages
WANT TO SUPPORT THE CHANNEL?
π° Patreon: patreon.com/distrotube
π³ Paypal: paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
ποΈ Amazon: amzn.to/2RotFFi
π Teespring: teespring.com/stores/distrotube
DT ON THE WEB:
πΈοΈ Website: http://distro.tube
π GitLab: gitlab.com/dwt1
π¨οΈ Mastodon: fosstodon.org/@distrotube
π« Reddit: reddit.com/r/DistroTube
π½οΈ Odysee: odysee.com/@DistroTube:2
FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
π Brave Browser - brave.com
π½οΈ Open Broadcaster Software: obsproject.com
π¬ Kdenlive: kdenlive.org
π¨ GIMP: gimp.org
π» VirtualBox: virtualbox.org
ποΈ Doom Emacs: github.com/hlissner/doom-emacs
Your support is very much appreciated. Thanks, guys!










