FTP mget without prompt

Long time no command line FTP.

Today I had to transfer 700Mb from one server to another in the same data center. SSH in to server #1 to grab the files from server #2 – but “a” wasn’t working as an answer to mget (multiple get) as it usually does – meaning “get all”: each file needed an individual yes/no answer a the command line to confirm that I really did want to download it. 

I really didn’t fancy having to watch/wait/click as 1400 files got copied over. 

Easy answer: type “prompt” in your ftp shell to toggle the prompting on and off.

Job done and all files sent over in a jiffy – without having to do a 4,000 km round trip to my desktop or further stuffing my internet connection.

ssh user@host.com
cd path/to/your/files
ftp ftp.host.com
cd path/to/your/files
mget *

  1. #1 by spring on November 14, 2012 - 6:47 am

    This is really helpful. Thanks a lot.

  2. #2 by Lino on February 8, 2013 - 2:58 am

    Please note, that FTP is a relic from back when the internet was like a country club with very few members and should not be used without encryption. ssh with sftp is a proper replacement for ftp and telnet (which is also unencrypted and therefore evil).

    Transmitting your passwords via plain text isn’t a good idea; every child can use wireshark.

You must be logged in to post a comment.