Re: pscp ls --time-style=long-iso display
From: Jacob Nevins (jacobn_at_chiark.greenend.org.uk)
Date: 12/24/04
- Previous message: Chris: "openssh host-based authentication"
- In reply to: manu: "pscp ls --time-style=long-iso display"
- Next in thread: manu: "Re: pscp ls --time-style=long-iso display"
- Reply: manu: "Re: pscp ls --time-style=long-iso display"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 24 Dec 2004 09:37:43 +0000 (GMT)
manu <echarruau@yahoo.com> writes:
>I am trying to modify the code of pscp to manage to send the
>--time-style=long-iso information.
>I first though it was a very single task as line 2085 (pscp.c) is :
>strcpy(cmd, "ls -la '");
>I though I could simply add
>strcpy(cmd, "ls -la --time-style=long-iso'");
>to the program and the problem would be
>unfortunatly this line has absolutly no effect on the program.
>
>After some times, I found that the command to request a list of the
>content of a directory is given in function void scp_sftp_listdir(char
>*dirname) (line 636 pscp.c).
PSCP supports two methods of performing file operations: SCP (the older
and simpler method) and SFTP (the newer method, which is used by default
if possible). When in SCP mode, "pscp -ls" just performs an "ls" command
on the server; scp_sftp_listdir() and SSH_FXP_OPENDIR is part of the
procedure for fetching a list of files with SFTP.
You can force a particular backend with the "-scp" and "-sftp" options;
if you use "-scp" (and the server supports your "--time-style" option)
you should find that your change becomes effective.
>Apparently pscp uses a ssh code (SSH_FXP_OPENDIR 11) to ask the server
>to execute a ls.
>I did not find any of these code in any ssh explanation.
<http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-06.txt>
(Note that this is a much newer version of the protocol spec than PuTTY
supports, and cannot be used to fully understand the implementation in
PSCP/PSFTP due to protocol changes.)
>Does it exist a special SSH code to execute a ls -l
>--time-style=long-iso to get the complete time description?
No.
("pscp -ls" in SFTP mode uses the "longname" field returned by the SFTP
server, and there's no way of requesting a particular format for that;
there's no need, as if a particular field or format is required it is
returned in a machine-readable form alongside the textual "longname"
field, and can be output in whatever format is desired. We will probably
have to do this at some point in any case, as more recent versions of
the SFTP protocol have dropped the "longname" field.)
- Previous message: Chris: "openssh host-based authentication"
- In reply to: manu: "pscp ls --time-style=long-iso display"
- Next in thread: manu: "Re: pscp ls --time-style=long-iso display"
- Reply: manu: "Re: pscp ls --time-style=long-iso display"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|