|
|
| Next: Which NIC for software AP? |
| Author |
Message |
Amy Lee External

Since: Jun 10, 2007 Posts: 6
|
Posted: Sun Jul 22, 2007 10:33 pm Post subject: Help: FTP File List Archived from groups: comp>os>linux>networking (more info?) |
|
|
Hello,
I'm a system administrator, and I wanna get a file list from ftp. For
example, I've logged in the ftp site, I type "ls" to see the list.
How can I save this list in my disk?
Thank you very much~
Regards,
Amy Lee |
|
| Back to top |
|
 |
Lasse Jensen External

Since: Mar 14, 2006 Posts: 77
|
Posted: Sun Jul 22, 2007 10:33 pm Post subject: Re: Help: FTP File List [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Amy Lee wrote:
> Hello,
>
> I'm a system administrator, and I wanna get a file list from ftp. For
> example, I've logged in the ftp site, I type "ls" to see the list.
>
> How can I save this list in my disk?
wget [url] gets a direcory listening and saves it as a HTML file if no other
input is specified. It can probably be told to do otherwise. Or parsed
though html2txt or something similar.
--
Lasse Jensen [fafler at g mail dot com]
Linux, the choice of a GNU generation. |
|
| Back to top |
|
 |
mathias.heinel External

Since: Jul 22, 2007 Posts: 1
|
Posted: Sun Jul 22, 2007 10:33 pm Post subject: Re: Help: FTP File List [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On 22 Juli, 16:33, "Amy Lee" <openlinuxsou... RemoveThis @gmail.com> wrote:
Hello Amy!
>
> How can I save this list in my disk?
>
Amy, I have a solution to your problem using at least the ordinary ftp
client in Unix/Linux/Whatever.
If I in the FTP program type 'ls > lsout.txt' I will get the result of
the ls command piped to a text file called 'lsout.txt' in my home
directory. But be carful to type the spaces in 'ls > lsout.txt', when
I tried my normal sloppy 'ls>lsout.txt' the command failed for me at
least.
So on my Debain system I will end up with a file with the full address
of '/home/mahe/lsout.txt', that contains the directory entries as
listed by the ls command.
No, you did not tell us what system and tools you are using, but this
is on the assumption that you are using some kind of Unix/Linux/*BSD
system relative.
Regards Mathias |
|
| Back to top |
|
 |
Bob Hauck External

Since: Aug 25, 2006 Posts: 345
|
Posted: Sun Jul 22, 2007 10:33 pm Post subject: Re: Help: FTP File List [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sun, 22 Jul 2007 22:33:01 +0800, Amy Lee <openlinuxsource.DeleteThis@gmail.com>
wrote:
> I'm a system administrator, and I wanna get a file list from ftp. For
> example, I've logged in the ftp site, I type "ls" to see the list.
>
> How can I save this list in my disk?
You could use wget. From the man page:
· If you specify a directory, Wget will retrieve the directory
list‐ing, parse it and convert it to HTML. Try:
wget ftp://ftp.gnu.org/pub/gnu/
links index.html
--
-| Bob Hauck
-| "Reality has a well-known liberal bias." -- Stephen Colbert
-| http://www.haucks.org/ |
|
| Back to top |
|
 |
Tim Southerwood External

Since: Apr 23, 2007 Posts: 113
|
Posted: Sun Jul 22, 2007 10:33 pm Post subject: Re: Help: FTP File List [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Amy Lee coughed up some electrons that declared:
> Hello,
>
> I'm a system administrator, and I wanna get a file list from ftp. For
> example, I've logged in the ftp site, I type "ls" to see the list.
>
> How can I save this list in my disk?
>
> Thank you very much~
>
> Regards,
>
> Amy Lee
Hi
Install ncftp, then you get a suite of commands including:
ncftpls
HTH
Tim |
|
| Back to top |
|
 |
Jerry Peters External

Since: Apr 06, 2004 Posts: 80
|
Posted: Sun Jul 22, 2007 10:33 pm Post subject: Re: Help: FTP File List [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Amy Lee <openlinuxsource.DeleteThis@gmail.com> wrote:
> Hello,
>
> I'm a system administrator, and I wanna get a file list from ftp. For
> example, I've logged in the ftp site, I type "ls" to see the list.
>
> How can I save this list in my disk?
>
> Thank you very much~
>
> Regards,
>
> Amy Lee
RTFM?
ls [remote-directory] [local-file]
Print a listing of the contents of a directory on the remote
machine. The listing includes any system-dependent informa
tion that the server chooses to include; for example, most
UNIX systems will produce output from the command `ls -l'.
(See also nlist.) If remote-directory is left unspecified,
the current working directory is used. If interactive
prompting is on, ftp will prompt the user to verify that the
last argument is indeed the target local file for receiving
ls output. If no local file is specified, or if local-file
is `-', the output is sent to the terminal.
Jerry |
|
| Back to top |
|
 |
Amy Lee External

Since: Jun 10, 2007 Posts: 6
|
Posted: Sun Jul 22, 2007 11:47 pm Post subject: Re: Help: FTP File List [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sun, 22 Jul 2007 17:08:15 +0200, Lasse Jensen wrote:
> Amy Lee wrote:
>
>> Hello,
>>
>> I'm a system administrator, and I wanna get a file list from ftp. For
>> example, I've logged in the ftp site, I type "ls" to see the list.
>>
>> How can I save this list in my disk?
>
> wget [url] gets a direcory listening and saves it as a HTML file if no other
> input is specified. It can probably be told to do otherwise. Or parsed
> though html2txt or something similar.
Thank you. However, would you like to give me an example? |
|
| Back to top |
|
 |
Amy Lee External

Since: Jun 10, 2007 Posts: 6
|
Posted: Mon Jul 23, 2007 12:17 am Post subject: Re: Help: FTP File List [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sun, 22 Jul 2007 15:47:42 +0000, mathias.heine wrote:
> On 22 Juli, 16:33, "Amy Lee" <openlinuxsou... DeleteThis @gmail.com> wrote:
>
> Hello Amy!
>
>>
>> How can I save this list in my disk?
>>
>
> Amy, I have a solution to your problem using at least the ordinary ftp
> client in Unix/Linux/Whatever.
> If I in the FTP program type 'ls > lsout.txt' I will get the result of
> the ls command piped to a text file called 'lsout.txt' in my home
> directory. But be carful to type the spaces in 'ls > lsout.txt', when
> I tried my normal sloppy 'ls>lsout.txt' the command failed for me at
> least.
> So on my Debain system I will end up with a file with the full address
> of '/home/mahe/lsout.txt', that contains the directory entries as
> listed by the ls command.
> No, you did not tell us what system and tools you are using, but this
> is on the assumption that you are using some kind of Unix/Linux/*BSD
> system relative.
>
> Regards Mathias
Thank you. But it dosen't support my system.
My system is Redhat 9 with 2.4.20-8, I use normal ftp version. When I type
"ls > /root/1.txt" in "ftp>", it can make 1.txt file, but it's empty.
Would you like to tell me the solution?
Regards,
Amy |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|