LC_TIME – 日時を英語表記で。

ターミナルでディレクトリ内容をリスト表示させると「月日」の判別がつきにくかったので、ロケール変数LC_TIMEを英語表記するようにしています。

日本語表記で ‘ls -l’ とすると

drwxr-xr-x    4 root     wheel   136B  5 31 02:28 System

となりますが、英語表記にすると

drwxr-xr-x    4 root     wheel   136B May 31 02:28 System

となり、一目瞭然ですね。

では、ロケール変数を変更するにはどうすればいいか。ホームディレクトリ直下に .bash_profile を作成して以下のコマンドを書き保存します。

export LC_TIME=en_US.UTF-8

よくわからないなぁって人はコマンドラインから以下のコマンドを実行してください。

echo "export LC_TIME=en_US.UTF-8" >> ~/.bash_profile
This entry was posted in UNIX/Linux. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Did you know that your Internet Explorer is out of date?
To get the best possible experience using our website we recommend that you upgrade to a newer version or other web browser. A list of the most popular web browsers can be found below.

Just click on the icons to get to the download page

Google Chrome
Google Chrome
Firefox
Firefox
Internet Explorer
Internet Explorer
Opera
Opera
Safari
Safari
1