免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1473 | 回复: 5
打印 上一主题 下一主题

这是什么呢? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-09-06 14:05 |只看该作者 |倒序浏览
高手说一下,linux系统中的有些文件用ls -l查看时显示
-rwxr-xr-x    1 oracle   oinstall  3716759 2007-01-11  0111.txt
而有些文件显示
-rw-r--r--    1 oracle   oinstall       19  6月 7 14:58 1.sql

为什么第一个文件日期,没时间呢?第二个文件没有年份呢?

论坛徽章:
0
2 [报告]
发表于 2007-09-06 14:15 |只看该作者
可以用stat看看是咋回事

ls --full-time

可能是与目前日期接近的时间,就不显示年了吧。

[ 本帖最后由 hohoxu_hao115 于 2007-9-6 14:20 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2007-09-06 14:39 |只看该作者
本来就不显示  year      


查看下你的 年的时间

论坛徽章:
0
4 [报告]
发表于 2007-09-06 15:23 |只看该作者
原帖由 linux_paly 于 2007年9月6日 14:39 发表
本来就不显示  year      


查看下你的 年的时间

那是因为你的文件都比较新的缘故。
比如这样date 060606062009,你再ls,发现年就出来了。

论坛徽章:
0
5 [报告]
发表于 2007-09-06 15:43 |只看该作者
这是ls的一个特性:
static char const *long_time_format[2] =
  {
    /* strftime format for non-recent files (older than 6 months), in
       -l output.  This should contain the year, month and day (at
       least), in an order that is understood by people in your
       locale's territory.  Please try to keep the number of used
       screen columns small, because many people work in windows with
       only 80 columns.  But make this as wide as the other string
       below, for recent files.  */
    N_("%b %e  %Y"),
    /* strftime format for recent files (younger than 6 months), in -l
       output.  This should contain the month, day and time (at
       least), in an order that is understood by people in your
       locale's territory.  Please try to keep the number of used
       screen columns small, because many people work in windows with
       only 80 columns.  But make this as wide as the other string
       above, for non-recent files.  */
    N_("%b %e %H:%M")
  };

论坛徽章:
0
6 [报告]
发表于 2007-09-06 16:06 |只看该作者
恩,我想,1年里,应该不会显示的.

受教.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP