What Is the Logic for the Abbreviation in Wc Command?

Some info in man wc.

wc - print newline, word, and byte counts for each file.
  -c, --bytes
          print the byte counts

   -m, --chars
          print the character counts

Maybe it is better to use -b indicating byte and -c indicating character.Why the author use -c indicating byte and -m indicating character ?What is the logic for this abbreviation?

0

1 Answer

From POSIX ()

The -c option stands for "character" count, even though it counts bytes. This stems from the sometimes erroneous historical view that bytes and characters are the same size. Due to international requirements, the -m option (reminiscent of "multi-byte") was added to obtain actual character counts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest