Computer Science - Unix - Discussion
Discussion Forum : Unix - Section 1 (Q.No. 23)
23.
Which command is used to count just the number of characters in a file?
Discussion:
4 comments Page 1 of 1.
D D said:
8 years ago
Here l is used to count the number of bytes in a file,
w prints the number of words in a file and,
l prints the number of lines in a file.
w prints the number of words in a file and,
l prints the number of lines in a file.
S.R.R. said:
1 decade ago
wc -l <filename> print the line count.
wc -c <filename> print the byte count.
wc -m <filename> print the character count.
wc -L <filename> print the length of longest line.
wc -w <filename> print the word count.
wc -c <filename> print the byte count.
wc -m <filename> print the character count.
wc -L <filename> print the length of longest line.
wc -w <filename> print the word count.
Rohit said:
1 decade ago
wc stands for word count.
The suffix -c: counts characters only
-l: lines only
-w: words only
And if you don't use any of them then the command wc gives all lines / words / characters.
The suffix -c: counts characters only
-l: lines only
-w: words only
And if you don't use any of them then the command wc gives all lines / words / characters.
Ganesh said:
1 decade ago
wc command is used for counting.
It,s switches,
l - No. of 'Lines'
w - No. of 'Words'
c - No. of 'Characters'
Just remember with initials.
It,s switches,
l - No. of 'Lines'
w - No. of 'Words'
c - No. of 'Characters'
Just remember with initials.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers