Re: ftp mdtm: invalid command

2023-08-04 Thread Simon Josefsson via Bug reports for the GNU Internet utilities
"Felipe G. Nievinski"  writes:

> 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?

I don't think that is better -- the "names" in the RFCs are cryptic
protocol names, usually not useful for a human interface.  The "modtime"
command as FTP client command has a long history, and for those who
prefer the RFC names the 'quote MDTM foo' is already available.
Increasing the command namespace increases the cognitive load on users
to comprehend the tool, which is already rather complex.

/Simon

> Felipe
>
>
>
>
>
> On Thu, Aug 3, 2023, 04:02 Erik Auerswald 
> wrote:
>
>> Hi,
>>
>> On Thu, Aug 03, 2023 at 12:20:29AM +0200, Simon Josefsson wrote:
>> > Erik Auerswald  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
>>


signature.asc
Description: PGP signature


Re: ftp mdtm: invalid command

2023-08-03 Thread Felipe G. Nievinski
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 
wrote:

> Hi,
>
> On Thu, Aug 03, 2023 at 12:20:29AM +0200, Simon Josefsson wrote:
> > Erik Auerswald  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
>


Re: ftp mdtm: invalid command

2023-08-03 Thread Erik Auerswald
Hi,

On Thu, Aug 03, 2023 at 12:20:29AM +0200, Simon Josefsson wrote:
> Erik Auerswald  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
> > .
> 
> 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



Re: ftp mdtm: invalid command

2023-08-02 Thread Felipe G. Nievinski
Thanks for your suggestion, it works great!

I also found the "quote" command a useful alternative.

-Felipe.


On Wed, Aug 2, 2023 at 7:21 PM Simon Josefsson  wrote:

> Erik Auerswald  writes:
>
> > Hi,
> >
> > 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
>
> /Simon
>
> >> For testing purposes, I've used the quote command:
> >>
> >> quote "mdtm myfilename.ext"
> >>
> >> which returns a timestamp correctly.
> >>
> >> ftp> mdtm 20230518T213000Z.gps.new
> >> ?Invalid command
> >> ftp> quote "mdtm 20230518T213000Z.gps.new"
> >> 213 20230521012942
> >>
> >>
> >> So, the server recognizes the command correctly.
> >>
> >> Am I missing something?
> >
> > FTP server and client are different programs, even though they are part
> of
> > the same collection.
> >
> > Sorry that I cannot provide a better answer.
> >
> > Best regards,
> > Erik
> >
> >
>


Re: ftp mdtm: invalid command

2023-08-02 Thread Simon Josefsson via Bug reports for the GNU Internet utilities
Erik Auerswald  writes:

> Hi,
>
> 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
> .

The "modtime" ftp client command uses MDTM, so try this:

ftp> modtime myfilename.ext

/Simon

>> For testing purposes, I've used the quote command:
>> 
>> quote "mdtm myfilename.ext"
>> 
>> which returns a timestamp correctly.
>> 
>> ftp> mdtm 20230518T213000Z.gps.new
>> ?Invalid command
>> ftp> quote "mdtm 20230518T213000Z.gps.new"
>> 213 20230521012942
>> 
>> 
>> So, the server recognizes the command correctly.
>> 
>> Am I missing something?
>
> FTP server and client are different programs, even though they are part of
> the same collection.
>
> Sorry that I cannot provide a better answer.
>
> Best regards,
> Erik
>
>



Re: ftp mdtm: invalid command

2023-08-02 Thread Felipe G. Nievinski
Thanks for the clarification!
And sorry for the confusion.
Felipe


On Wed, Aug 2, 2023, 17:55 Erik Auerswald 
wrote:

> Hi,
>
> 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
>  >.
>
> > For testing purposes, I've used the quote command:
> >
> > quote "mdtm myfilename.ext"
> >
> > which returns a timestamp correctly.
> >
> > ftp> mdtm 20230518T213000Z.gps.new
> > ?Invalid command
> > ftp> quote "mdtm 20230518T213000Z.gps.new"
> > 213 20230521012942
> >
> >
> > So, the server recognizes the command correctly.
> >
> > Am I missing something?
>
> FTP server and client are different programs, even though they are part of
> the same collection.
>
> Sorry that I cannot provide a better answer.
>
> Best regards,
> Erik
>


Re: ftp mdtm: invalid command

2023-08-02 Thread Erik Auerswald
Hi,

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
.

> For testing purposes, I've used the quote command:
> 
> quote "mdtm myfilename.ext"
> 
> which returns a timestamp correctly.
> 
> ftp> mdtm 20230518T213000Z.gps.new
> ?Invalid command
> ftp> quote "mdtm 20230518T213000Z.gps.new"
> 213 20230521012942
> 
> 
> So, the server recognizes the command correctly.
> 
> Am I missing something?

FTP server and client are different programs, even though they are part of
the same collection.

Sorry that I cannot provide a better answer.

Best regards,
Erik