How do I get rid of the verbose error messages?

Many of the messages from the Unix commands are available in different languages. This is controlled by the LANG environment variable, the default being En_US meaning English in the US. All the default messages have a message number associated with them, e.g.:

$ cat no-such-file

cat: 0652-050 Cannot open no-such-file.

If you prefer the terser Unix-looking error message, set your environment variable LC_MESSAGES to C, and you will get:

$ cat no-such-file

cat: Cannot open no-such-file.

By default LC_MESSAGES is the same as your environment LANG. Setting LANG does also work, but should be avoided since it changes app-defaults lookup etc. See locale(): LC_ALL

From: Bjorn P. Brox <brox@corena.n>

Leave a Comment

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top