显示文件时间包含 年月日 小时分钟秒
时间:2011-05-11
来源:互联网
测试 touch -t 04241112 starttemp #精确到12分钟
touch -t 04241220 endtemp #截止到12点20
find [dir] -newer starttemp -a ! -newer endtemp -exec ls -l {} \;
偶然发现这些 文件都不包括年
ls -lh
如
-rw-rw-r-- 1 lh lh 12 Jan 12 05:05 a.log
-rw-rw-r-- 1 lh lh 724 Dec 30 08:19 a.sql
因为这里文件是09 10 11 3年的
所以想知道 这里 ls或 ll 如何 能显示的时候把 年月日 小时分钟秒能显示出来 ?
touch -t 04241220 endtemp #截止到12点20
find [dir] -newer starttemp -a ! -newer endtemp -exec ls -l {} \;
偶然发现这些 文件都不包括年
ls -lh
如
-rw-rw-r-- 1 lh lh 12 Jan 12 05:05 a.log
-rw-rw-r-- 1 lh lh 724 Dec 30 08:19 a.sql
因为这里文件是09 10 11 3年的
所以想知道 这里 ls或 ll 如何 能显示的时候把 年月日 小时分钟秒能显示出来 ?
作者: liyihongcug 发布时间: 2011-05-11
本帖最后由 shplpy 于 2011-05-11 20:25 编辑
ls --full-time
ls -l --time-style=long-iso
QUOTE:
测试 touch -t 04241112 starttemp #精确到12分钟
touch -t 04241220 endtemp #截止到12点20
find [dir ...
liyihongcug 发表于 2011-05-11 19:40
touch -t 04241220 endtemp #截止到12点20
find [dir ...
liyihongcug 发表于 2011-05-11 19:40
ls --full-time
ls -l --time-style=long-iso
作者: shplpy 发布时间: 2011-05-11
man ls:
QUOTE:
--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
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
作者: xiaopan3322 发布时间: 2011-05-11
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28