Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Brian Cryer
May 28, 2008, 6:06 am
rate this thread
server come back with no time information only the date. I suspect this is
on files over 6 months old, but I've not done an exhaustive investigation.
I've been aware of this for a long time, but want to understand it, so can
anyone point me in the right direction so I can understand this behaviour,
and specifically when I can expect the time component to disappear?
Re: Semi-OT: When is time missing from an FTP listing
You're right that it's typically on Unix servers, and you're right
that it's typically six months. The FTP server software doesn't have a
file listing command of its own, it simply runs the Unix/Linux "ls -l"
command and displays the results. Your own FTP client software either
shows the raw output or re-parses it into a more human-friendly
result, but either way it's coming from the same underlying source and
is subject to the same underlying restrictions. And the default
behaviour of "ls -l" on many systems is to show dates differently for
"recent" and "non-recent" files, with the distinction between the two
itself defaulting to six months.
Here's what the official documentation of Unix "ls" has to say:
The <date and time>, field will contain the appropriate date and
timestamp of when the file was last modified. In the POSIX locale,
the field is the equivalent of the output of the following date
date "+%b %e %H:%M"
if the file has been modified in the last six months, or:
date "+%b %e %Y"
(where two space characters are used between %e and %Y) if the file
has not been modified in the last six months or if the modification
date is in the future
Not all servers use the same version of "ls" (in particular, a common
Linux version does it differently) and so some FTP servers will show
times on all files, even old ones. But this is why some of them do
show it differently!
Pointless waffle (again) at http://mark.x.tc
"You surround me like a winter fog, you've come and burned me with a kiss"
- » Can OSCommerce be used for a job search type website?
- — Previous thread in » Webmaster Forum