Most shell allow the temporary usage of a different localization for single commands. This is great in the case someone is not using an English locale and is using the output of a command in his/her question or reply.
For instance # cd /nonexistent
will output -bash: cd: /nonexistent: Datei oder Verzeichnis nicht gefunden
. Everybody that doesn't speak German has basically speaking no clue what the message is telling.
But if I use this command # LC_ALL=C cd /nonexitent
I will get this output: -bash: cd: /nonexistent: No such file or directory
While posting commands where the output matters you of course should leave the LC_ALL=C
part out.
For instance:
This is bad:
root@server:~# cd /nonexistent
-bash: cd: /nonexistent: Datei oder Verzeichnis nicht gefunden
This is better:
root@server:~# LC_ALL=C cd /nonexistent
-bash: cd: /nonexistent: No such file or directory
And this would be perfect:
root@server:~# cd /nonexistent
-bash: cd: /nonexistent: No such file or directory
I think we should really make this a convention here and make sure everybody knows about it to make it a whole lot simpler for everybody to understand!
An older question (by me :( ) that has that problem: https://stackoverflow.com/questions/20691852/linux-bash-parse-date-in-custom-format (I didn't know there was this board when I posted this question.)
Edit:
Another possible way of dealing with this "problem" would be putting this piece of advice directly on the ask question
page.
Of course this does not apply to people using their system in English!
LANGUAGE=en
instead to only override the language of messages and not all the other aspects of localisation (strftime month/day names would still be in the user's language).LANGUAGE
takes precedence overLC_ALL
(except forLC_ALL=C
orLC_ALL=POSIX
).