[Linux] - 修改ls/ll显示的时间格式

1.修改ls显示格式

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

ls -l --time-style '+%Y%m%d %H:%M:%S'
drwxr-x--- 2 edwetl edwetl    4096 20190103 21:08:45 arc_test

2.修改配置到bash_profile

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

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

PS:

ls与ll同理

猜你喜欢

转载自www.cnblogs.com/HD/p/12319468.html