Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mget prompt override

I am using ftp in the command line (terminal) to transfer multiple data files from a remote server to my local computer. There are multiple files (~40) in the directory and I would like to transfer them all without having to answer yes in the prompt for each file. I tried mget * but this only transferred the first file and then a prompt popped up for the second file.

like image 217
glongo_fishes Avatar asked Feb 12 '13 15:02

glongo_fishes


People also ask

What is the Mget command in FTP?

The MGET command transfers one or more files matching the given filespec from the FTP server to the PC. You can use wildcards to transfer multiple files. Most servers support wildcards in the <serverspec>.

What is difference between GET and Mget?

Use the get command to download individual files. Use the Multiple Get (mget) command with the wildcard character (*) to download all available files in a directory. Most FTP clients provide the ability to rename files as they are retrieved using the get command. This is not usually possible using the mget command.

How use Mget command in Linux?

The mget command is used to retrieve multiple files from a remote server directory and store them in the current local directory.


1 Answers

When you already started ftp you can issue the prompt command to toggle between getting prompted and not getting prompted. So this should do the trick:

> ftp <some server>
ftp> prompt
Interactive mode OFF .
ftp> mget *
like image 62
jboi Avatar answered Oct 24 '22 03:10

jboi