Если вы хотите, чтобы изменил формат даты файла при просмотре даты файла с помощью ls -l
, используйте переключатели ls
для управления выводом.man ls
показывает:
--time-style=STYLE
with -l, show times using style STYLE: full-iso, long-iso, iso,
locale, or +FORMAT; FORMAT is interpreted like in 'date'; if
FORMAT is FORMAT1FORMAT2, then FORMAT1 applies to
non-recent files and FORMAT2 to recent files; if STYLE is pre‐
fixed with 'posix-', STYLE takes effect only outside the POSIX
locale
Итак:
$ touch foo
$ ls -l --time-style=+"%m %d %H:%M" foo
-rw-r--r-- 1 james james 0 07 01 23:50 foo