linux下修改ls显示的时间格式

 
更多

linux 下修改 ls 命令显示的时间格式,两种方式。

1.修改ls显示格式

ls -l --time-style '+%Y-%m-%d %H:%M:%S'
drwxr-x--- 2 yhm yhm    4096 2019-01-03 21:08:45 phpernote

2.修改配置到bash_profile

vi ~/.bash_profile
export TIME_STYLE='+%Y/%m/%d %H:%M:%S'

cat ~/.bash_profile | grep TIME 
source ~/.bash_profile
打赏

本文固定链接: https://www.cxy163.net/archives/3144 | 绝缘体

该日志由 绝缘体.. 于 2022年04月12日 发表在 未分类 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: linux下修改ls显示的时间格式 | 绝缘体
关键字: , , , ,

linux下修改ls显示的时间格式:等您坐沙发呢!

发表评论


快捷键:Ctrl+Enter