Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Unix/Linux Tutorials | Word Count (wc) Command in UNIX/LINUX | by Durga Sir
Play lesson

Unix/Linux Tutorial Videos - Unix/Linux Tutorials | Word Count (wc) Command in UNIX/LINUX | by Durga Sir

5.0 (2)
28 learners

What you'll learn

This course includes

  • 44.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Word Count Command (wc command): ---------------------------------------------- We can use wc command to count number of lines,words and characters present in the given file. $ wc filename no_of_lines no_of_words no_of_chars file_name eg: durgasoft@durgasoft:~/Desktop$ wc file1.txt 4 16 78 file1.txt 4 ---The number of lines 16 ---The number of words 78 ---The number of characters (File size in bytes) Note: In UNIX, each character will take 1 byte memory. Hence file size in bytes is exactly same as number of characters. We can use the following options with wc command -l === To print only number of lines -w === To print only number of words -c === To print only number of characters -lw === To print only number of lines and words -lc === To print only number of lines and characters -wc === To print only number of words and characters -L ==== To print number of characters present in the Longest Line. We can use wc command for multiple files simultaneously. $ wc file1.txt file2.txt file3.txt 5 17 140 file1.txt 4 6 91 file2.txt 7 9 129 file3.txt 16 32 360 total #DURGASOFTWARE #UNIX/LINUX #WordCountCommand

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere