質問: lsの日付/時刻形式を恒久的に変更する ls -lを実行すると-rw------- 1 nifle none 17k jul 15 01:48 .bash_history -rwxr-xr-x 1 nifle none 1.2k feb 9 2010 .bash_profile* -rwxr-xr-x 1 nifle none 3.7k mar 22 10:03 .bashrc* -rwxr-xr-x 1 nifle none 3.7k feb 9 2010 .bashrc~* drwxr-xr-x+ 1 nifle none 0 mar 6 17:31 .cpan/ drwxr-xr-x+ 1 nifle none 0 jan 3 2011 .emacs.d/ <snip> 日付/時刻の形式を常にyyyy-mm-dd hh:mmに設定するにはどうすればよいですか?
回答: gnu ls、from info ls "formatting file timestamps": `--time-style=style' list timestamps in style style. the style should be one of the following: .。 `long-iso' list iso 8601 date and time in minutes, e.g., `2002-03-30 23:45'. these timestamps are shorter than `full-iso' timestamps, and are usually good enough for everyday work. this style is equivalent to `+%y-%m-%d %h:%m'. .。 you can specify the default value of the `--time-style' option with the environment variable `time_style'; if `time_style' is not set the default style is `locale'. したがって、.bashrcまたは.bash_profileに以下を入力すると、すべて設定されます。export time_style=long-iso