pscp ls --time-style=long-iso display
From: manu (echarruau_at_yahoo.com)
Date: 12/23/04
- Next message: all mail refused: "Re: pscp ls --time-style=long-iso display"
- Previous message: Chuck: "Re: scp from cron fails"
- Next in thread: all mail refused: "Re: pscp ls --time-style=long-iso display"
- Reply: all mail refused: "Re: pscp ls --time-style=long-iso display"
- Reply: Richard E. Silverman: "Re: pscp ls --time-style=long-iso display"
- Reply: Jacob Nevins: "Re: pscp ls --time-style=long-iso display"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 23 Dec 2004 10:56:15 -0800
Hi,
I am using pscp in a php program to retrieve some files.
Everything is working fine except that I can't retrieve the list of
file on server as --time-style=long-iso.
The consequence is that I can't always get the time of creation of a
file.
This gives the following output.
-rw-r--r-- 258048 Jul 9 14:15 TTFILE00-3165
-rw-r--r-- 62 Jul 9 14:16 TTFILE00-3165.crc
-rw-r--r-- 58048 Mar 1 2004 TTFILE00-4110
-rw-r--r-- 65 Mar 1 2004 TTFILE00-4110.crc
Under unix I would make
ls -l --time-style=long-iso
which would give me :
-rw-r--r-- 258048 2004-07-09 14:15 TTFILE00-3165
-rw-r--r-- 62 2004-07-09 14:16 TTFILE00-3165.crc
-rw-r--r-- 258048 2004-03-01 15:27 TTFILE00-4110
-rw-r--r-- 65 2004-03-01 15:35 TTFILE00-4110.crc
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).
This function uses a second function fxp_opendir_send(char *path)
(line 585 pscp.c) which at its turn uses the function
sftp_pkt_init(SSH_FXP_OPENDIR) to send the code
#define SSH_FXP_OPENDIR 11 /* 0xb */.
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.
Does it exist a special SSH code to execute a ls -l
--time-style=long-iso to get the complete time description?
Regards,
Emmanuel
- Next message: all mail refused: "Re: pscp ls --time-style=long-iso display"
- Previous message: Chuck: "Re: scp from cron fails"
- Next in thread: all mail refused: "Re: pscp ls --time-style=long-iso display"
- Reply: all mail refused: "Re: pscp ls --time-style=long-iso display"
- Reply: Richard E. Silverman: "Re: pscp ls --time-style=long-iso display"
- Reply: Jacob Nevins: "Re: pscp ls --time-style=long-iso display"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|