Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What command is used to count the total number of lines, words, and characters contained in a file?

A. countw B. wcount C. wc D. count p E. None of the above

user-image
Question added by mohammed el hosseny , Network operation center (NOC ) Engineer , TEData
Date Posted: 2014/10/13
Ahmad Ghieth
by Ahmad Ghieth , Technical Manager , Ambience Jordanian Lighting

wc -l tecmint.txt

(to show # of lines)

wc -w tecmint.txt

(to show # of words)

 

wc -c tecmint.txt

(Bytes and Characters)

 

# wc -L tecmint.txt

 

(Length of Longest Line)

Aqueeluddin Khaja
by Aqueeluddin Khaja , Systems Engineer , OSI Consulting

Hi All,

Command "wc" can be used for count of the total number of lines, words, and characters contained in a file.

 

To calculate number of lines in a file. 

#wc  -l <filename>

 

To calculate number of words in a file. 

#wc -w <filename>

 

To calculate number of characters in a file. 

#wc -c <filename>

Emad Mohammed said abdalla
by Emad Mohammed said abdalla , ERP & IT Software, operation general manager . , AL DOHA Company

The answer will be C. WC

Mustafa Omer Shoaib
by Mustafa Omer Shoaib , Senior Software Engineer , Saudi Consolidated Engineering Company (Khatib & Alami)

C.wc

Mohammed Haseeb Nawaz
by Mohammed Haseeb Nawaz , System Engineer , Maaden Phosphate Company

WC

What command is used to count the total number of lines, words, and characters contained in a file?

 

Mostafa Mohamed Abdelrahman Mohamed
by Mostafa Mohamed Abdelrahman Mohamed , Senior Virtualization and Application Management Executive , Qatar National Bank - ALAHLI

wc

Muhammad Anzar
by Muhammad Anzar , DevOps/DevSecOps Architect , Confidential

wc is the answer. If you want to get total number of lines, give -l switch end of the command

 

Eg: wc -l filename

Davide Raro
by Davide Raro , Project Manager , COROBOR Systèmes, a Campbell Scientific Company

you can use wc command as suggested by the others

abdul salam
by abdul salam , System Administrator , Aforeserve.com Ltd

we can use the command "wc" 

Vikram Singh
by Vikram Singh , Principal Genesys Executive , Home Credit India

As per mentioned option,The right option is C

wc

More Questions Like This