Getting mulitple files from ftp server with out any prompt
How to get multiple file from FTP server? Normally when we try to connect to a FTP server we can download one file after other but if we want to download multiple files at a time we can use mget at FTP prompt but the issue is it always asks you to conform your action by presenting you with yes/no prompt for which we have to either enter "Yes" or "No". This is not advisable when you want to script your actions like keeping in a shell script. We can resolve this issue in two ways 1)when you are accessing FTP server use -i option which is nothing but interactive way to get files from FTP server, actually this -i option will disable iteractive download of files from server. Syntax: ftp -i server-ip/servername Example: #ftp -i 222.1.89.1 2)This is used when you are middle of the transaction you can use prompt command in ftp mode to get multiple files without any prompt, here is the example and this is for that session ftp> ls 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. -rw-r--r-- 1 1005 0 47 Apr 11 19:37 file1.txt -rw-r--r-- 1 1005 0 47 Apr 11 19:37 file2.txt -rw-r--r-- 1 1005 0 47 Apr 11 19:37 file3.txt -rw-r--r-- 1 1005 0 47 Apr 11 19:37 file4.txt 226 Directory send OK. ftp> prompt...
Read More