Jump to content

Linux wc Command Explained for Beginners


securitybreach

Recommended Posts

securitybreach

Linux from the command line - Using the Word Count (wc) command

 

wc is a very simple program that is very handy and very powerful.

 

It allows you to count things. The obvious use is counting the words in an essay to make sure you've reached the assigned 5000 word minimum for example. But when combined with bash scripts, wc has a lot more diverse and powerful uses, especially when combined with pipes and redirects.

 

For example, if you want to know how many PCI devices are in your system, type:

 

lspci | wc -l

USB devices?

 

lsusb | wc -l

 

https://www.howtofor...ers-6-examples/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...