ncftp, wget

ncftp simply doesn't like to do recursive GETs. It'll churn along happily until it hits some random file and then timeout. If I restart the same command it'll sometimes get further and timeout, sometimes timeout sooner. Oh how I wish I could find a linux FTP client that doesn't suck half the time. I still entertain notions of writing my own someday. I know pretty well how I want the UI to work, it's the backend that I always get hung up on. I'm not going to re-implement the FTP protocol. Ruby has a nice FTP library but it seems somewhat limited in certain ways. Or else I haven't delved into it enough.

Either way. I'm going to use wget for my recursive FTP downloads from now on. Probably should've done that to begin with.

wget -r -x --ftp-user USERNAME  --ftp-password PASSWORD 'ftp://SERVER/DIRECTORY/*'

I at first was upset about having my FTP password lying around on the command line / process list but then I realized that I'm the only person who uses now and who will ever use this computer. I'll delete it from ~/.bash_history after I'm done. If someone is psing my process list right now, I have much bigger problems than having them gank my FTP password.

3 Responses to “ncftp, wget”

  1. Quoth Jan-Hendrik Zab:

    Hey,
    have you ever tried lftp or yafc? I haven't got any problems with them so far. :)

  2. Quoth Brian:

    Thank you very much for the suggestion. I am going to give yafc an extended try.

  3. Quoth Levi Figueira:

    As to the password, try doing this:
    wget -rx ‘ftp://user:pass@host.com'

    wget will turn it into:
    ftp://user:*password*@host.com

    on both screen and logs! ;)

    Cheers,
    ~Levi F.

Leave a Reply

You can use these tags in comments (Note: HTML is automatically escaped inside <pre> tags, nowhere else, so if you post source code, put it in <pre>):

<pre lang="some_programming_language"> 
<em>
<strong>
<a href="url">

NOTE: Comments are automatically spam-filtered. If your comment fails to appear, it was likely munched by the filter. Try not to link-spam or post anything that looks like it was typed by a robot.