ash;输出修改文件的时间,包括年和秒[封闭]

我想输出一个修改文件的时间,包括年和秒.我试图使用ls -linT,意味着-T必须这样做,但它不会. -T被识别为制表大小.
我正在使用ls搜索解决方案.有人可以帮我吗
尝试–time-style = full-iso,或者只是–full-time:
ls -l --time-style=full-iso
ls --full-time

从手册页:

–time-style=STYLE
with -l,show times using style STYLE: full-iso,long-iso,iso,locale,+FORMAT. FORMAT is interpreted like date'; if
FORMAT is FORMAT1<newline>FORMAT2,FORMAT1 applies to non-recent files
and FORMAT2 to recent files; if STYLE is prefixed with
posix-‘,
STYLE takes effect only outside the POSIX locale

所以你也可以有一个格式说明符(见格式字符串的日期手册页):

ls -l --time-style=+"%Y %H:%M:%S"

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...