Re: ftp mdtm: invalid command

"Felipe G. Nievinski" <[email protected]>
Newsgroups gmane.comp.gnu.inetutils.bugs
Message-ID <CAGXn2T2HqbOiPWczgJ_1KDvGnOyc7B_MTw_QXrPDhxRoCXWLcA@mail.gmail.com>
Sorry if it's a silly question, but wouldn't it be better for the FTP
client to support the command names as standardized in IETF RFCs?

Felipe





On Thu, Aug 3, 2023, 04:02 Erik Auerswald <[email protected]>
wrote:

> Hi,
>
> On Thu, Aug 03, 2023 at 12:20:29AM +0200, Simon Josefsson wrote:
> > Erik Auerswald <[email protected]> writes:
> > > On Wed, Aug 02, 2023 at 04:01:00PM -0300, Felipe G. Nievinski wrote:
> > >>
> > >> I'm using the FTP utility, which supposedly supports the MDTM command
> (as
> > >> per section 21.1 Standards of the documentation):
> > >> https://www.gnu.org/software/inetutils/manual/inetutils.html
> > >
> > > This documentation pertains to the FTP server (ftpd).
> > >
> > >> However, when I try mdtm, it complains: "invalid command".
> > >
> > > The FTP client (ftp) does not implement the MDTM command, as
> documented in
> > > <
> https://www.gnu.org/software/inetutils/manual/html_node/Ftp-commands.html
> >.
> >
> > The "modtime" ftp client command uses MDTM, so try this:
> >
> > ftp> modtime myfilename.ext
>
> Thanks, that is interesting!  The descriptions of MDTM and modtime
> are similar:
>
>  * MDTM:
>      show last modification time of file
>
>  * modtime file-name:
>      Show the last modification time of the file on the remote machine.
>
> It seems as if the FTP client often uses longer, more human friendly
> command names instead of the respective server request names.  As such
> it seems as if "modtime" in the client is "MDTM" in the server.  The code
> for ftp/cmds.c::modtime seems to confirm that.
>
> As such the answer to the original question is:
>
>     "MDTM" is spelled "modtime" in the FTP client.
>
> I have learned something today. :-)
>
> Best regards,
> Erik
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.