Networking Forums

Networking Forums > Computer Networking > Linux Networking > Help: FTP File List

Reply
Thread Tools Display Modes

Help: FTP File List

 
 
Amy Lee
Guest
Posts: n/a

 
      07-22-2007, 02:33 PM
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
 
Reply With Quote
 
 
 
 
Lasse Jensen
Guest
Posts: n/a

 
      07-22-2007, 03:08 PM
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.
 
Reply With Quote
 
Amy Lee
Guest
Posts: n/a

 
      07-22-2007, 03:47 PM
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?
 
Reply With Quote
 
mathias.heinel@gmail.com
Guest
Posts: n/a

 
      07-22-2007, 03:47 PM
On 22 Juli, 16:33, "Amy Lee" <openlinuxsou...@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

 
Reply With Quote
 
Bob Hauck
Guest
Posts: n/a

 
      07-22-2007, 03:52 PM
On Sun, 22 Jul 2007 22:33:01 +0800, Amy Lee <(E-Mail Removed)>
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/
 
Reply With Quote
 
Amy Lee
Guest
Posts: n/a

 
      07-22-2007, 04:17 PM
On Sun, 22 Jul 2007 15:47:42 +0000, mathias.heine wrote:

> On 22 Juli, 16:33, "Amy Lee" <openlinuxsou...@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


 
Reply With Quote
 
Tim Southerwood
Guest
Posts: n/a

 
      07-22-2007, 09:11 PM
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

 
Reply With Quote
 
Jerry Peters
Guest
Posts: n/a

 
      07-22-2007, 10:11 PM
Amy Lee <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Copy Windows -> SMB Linux; File size problem Publishers Press Windows Networking 0 10-23-2008 06:05 PM
Rinominare File con data attraverso un file Batch Daytan Windows Networking 1 09-18-2007 05:40 PM
My ISP wish list Simon Ough Broadband 17 11-16-2005 09:19 AM
Locking a file temporarily (till the file is transferred completely). Lince M Lawrence Linux Networking 2 11-10-2004 01:15 AM
MN-740 wish list Sean Broadband Hardware 1 01-18-2004 06:53 PM



1 2 3 4 5 6 7 8 9 10 11