Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

What does “LC_ALL=C” do?

What does the C value for LC_ALL do in Unix-like systems?

I know that it forces the same locale for all aspects but what does C do?
by

2 Answers

akshay1995
It forces applications to use the default language for output:

$ LC_ALL=es_ES man
¿Qué página de manual desea?

$ LC_ALL=C man
What manual page do you want?

and forces sorting to be byte-wise:

$ LC_ALL=en_US sort <<< $'a\nb\nA\nB'
a
A
b
B

$ LC_ALL=C sort <<< $'a\nb\nA\nB'
A
B
a
b
sandhya6gczb
C is the default locale,"POSIX" is the alias of "C". I guess "C" is derived from ANSI-C. Maybe ANSI-C define the "POSIX" locale.

Login / Signup to Answer the Question.