Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dates in the output of the FTP "LIST" command

0 views
Skip to first unread message

Jonathan de Boyne Pollard

unread,
Dec 1, 2004, 11:42:37 PM12/1/04
to
VF> Isn't it safe to assume that if the server doesn't send a year-spec,
VF> then it's the current year.

No. The basic problem is that there is no fixed format for the output
of the "LIST" command. Therefore what a client receives varies from
server software to server software. Some server softwares simply invoke
"/bin/ls" with the "-l" flag and send what it generates. Other server
softwares read the directory directly, and generate the listing
themselves. Of course, not all "/bin/ls" commands are identical (The
GNU "ls" command is different to, and will generate different output to,
the "ls" that comes bundled with some Unices.), the output of "/bin/ls"
can vary according to the locale that the FTP server is operating in,
not all FTP servers are running on Unix or Linux, not all
non-Unix/non-Linux FTP server softwares (which usually read the
directory directly rather than invoke an external command) decide to
employ the same rules about when to switch date formats, and not all FTP
server softwares that read the directory directly even imitate the
"/bin/ls" output format at all. The whole thing is a mess.

The simple truth, as nearly articulated by RFC 959, is that the output
of the "LIST" command is suitable for humans wielding FTP clients, but
isn't suitable at all for programs attempting to perform automated tasks:

RFC 959> Since the information on a file may vary widely from system
RFC 959> to system, this information may be hard to use automatically
RFC 959> in a program, but may be quite useful to a human user.

EPLF was invented to rectify this problem, and has been around for some
years. A fair number of FTP clients now support it. Encourage its use
on the FTP server that is giving you gyp. Encourage JP Software to
support it in its FTP client.

<URL:http://cr.yp.to/ftp/list.html>
<URL:http://cr.yp.to/ftp/list/binls.html>
<URL:http://cr.yp.to/ftp/list/eplf.html>
<URL:http://cr.yp.to/ftpparse.html>

Dr John Stockton

unread,
Dec 2, 2004, 1:00:41 PM12/2/04
to
JRS: In article <c1.01.2thvyR$5...@J.de.Boyne.Pollard.localhost>, dated
Thu, 2 Dec 2004 04:42:37, seen in news:comp.os.msdos.4dos, Jonathan de
Boyne Pollard <J.deBoyn...@Tesco.NET> posted :

>VF> Isn't it safe to assume that if the server doesn't send a year-spec,
>VF> then it's the current year.

There is a convention, which may or may not be applicable in your
circumstances, that if a date is within six months of NOW the year is
replaced by the time.

In that case, a date of Feb 29 would now be invalid, since although 2004
is Leap, 2005 is not.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.

0 new messages