The other day I was attempting to use the Linux ftp command line application to obtain all of the files, sub directories, and files within the sub directories from an FTP site. The first issue I ran into was the issue of being prompted to confirm each and every file that is downloaded. Below I describe how to accomplish turning off the prompt and just to note I ended up using “wget” to download all of the files, sub directories, and files within the sub directories via FTP on the remote server.
Turn Off Linux FTP Prompt When Using mget:
When attempting to download all of the files in a specific directory using the FTP command line application in Linux you will get prompted for each file by default as shown in the below example.
Example Prompt When Using mget Via Linux FTP CLI Command:
- ftp> mget *
- mget testfile.txt? y
- mget testfile.txt.bak? y
Turning off this prompt is easy and can be done using a single command once connected to the FTP server as shown in the below example.
Turn Off mget Prompt When Using Linux FTP CLI Command:
- ftp> prompt
- Interactive mode off.
As you can see above just type “prompt” from the command line and then you will no longer be prompted each time a file is downloaded using mget.