linux readme 格式,linux /bin/ls format格式

博客讨论了FTP服务器使用/bin/lsformat命令输出文件信息的格式,包括最近六个月内的文件时间表示和超过六个月的文件时间表示。文章指出,这种格式在时间解析上存在不准确性,可能导致镜像问题。此外,不同服务器可能有不同的输出格式,客户端需要能处理各种情况。文章链接提供了更多关于FTP响应解析的格式详情。
摘要由CSDN通过智能技术生成

简单说 修改时间在6个月之内的-rw-r--r-- 1 owner group 213 Aug 26 16:31 README

6个月之上的-rw-r--r-- 1 owner group 1383 Apr 10 1997 ip.c

/bin/ls format

/bin/ls format is a series of lines terminated by 015012. Servers using /bin/ls format need to be prepared to generate lines in the following form:-rw-r--r-- 1 owner group 213 Aug 26 16:31 README

The line containsfor a regular file or d for a directory;literal string rw-r--r-- 1 owner group for a regular file, or rwxr-xr-x 1 owner group for a directory;

the file size in decimal right-justified in a 13-byte field;

a three-letter month name, first letter capitalized;

a day number right-justified in a 3-byte field;

a space and a 2-digit hour number;

a colon and a 2-digit minute number;

a space and the abbreviated pathname of the file.

File names containing spaces, stars, hyphens, or slashes will be misinterpreted by some clients, and must be omitted from the list.

The month name, day number, hour number, and minute number express the file's modification time in the server's local time zone. This creates several obstacles to reliable mirroring.

The format shown above applies only to files modified in the last six months. Other files show the year instead of the hour number and minute number:-rw-r--r-- 1 owner group 1383 Apr 10 1997 ip.c

Some servers (e.g., NetWare) set the cutoff at one year, making it impossible for the client to reliably distinguish dates near the cutoff from recent dates.

Clients attempting to parse /bin/ls format must be prepared for a much wider range of line formats. All the formats I've seen are documented in http://cr.yp.to/ftpparse.html.

赞助一杯咖啡☕️

本文由 widdy 创作,采用 知识共享署名4.0 国际许可协议进行许可

本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名

最后编辑时间为: Dec 2, 2020 at 04:17 pm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值