HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

mput without asking yes or no

 
mehul_3
Regular Advisor

mput without asking yes or no

I have to put multiple files to the server using ftp but I don't want system ask for each and every file for yes or no prompt and want to put at one go. pl sent appropriate command to do it.

Waiting for response.

Regards,
Mehul
7 REPLIES
avizen9
Esteemed Contributor

Re: mput without asking yes or no

Hello Mehul,

why dont you use put insted of mput,
if you will use put it would not ask any confirmation.

if you have any specific reason to use mput let me know, thanks,
Suraj K Sankari
Honored Contributor

Re: mput without asking yes or no

hi,
used -i with ftp

like

ftp -i servername

now mget and mput will not ask any "y"

Suraj
Steven Schweda
Honored Contributor

Re: mput without asking yes or no

man ftp

Look for the "prompt" command.


> Waiting for response.

Really?

You could be reading while you wait.
Nido
Trusted Contributor

Re: mput without asking yes or no

Hello Mehul,

As suggested, use 'prompt'
Just type 'prompt' in FTP prompt will tell you if interactive mode is ON or OFF.

for more details, refer `man ftp`

Thanks,
" Let Villagers Be Happy!! "
Steven Schweda
Honored Contributor

Re: mput without asking yes or no

> Just type 'prompt' in FTP prompt will tell
> you if interactive mode is ON or OFF.

Well, it will tell you what you've just
_changed_ it to be. The "status" command
should show you what's true (about prompting
and many other things) without changing
anything.
Ganesan R
Honored Contributor

Re: mput without asking yes or no

Hi Mehul,

"prompt" is command you need to use in ftp prompt to solve your purpose.

By default prompt will be ON which needs user intervention for every file transfer.

if you just type ftp>prompt which change the prompt value to OFF and therefore no user intervention is needed for multiple file transfer.
Best wishes,

Ganesh.
OldSchool
Honored Contributor

Re: mput without asking yes or no

or, as noted above, start the session w/

ftp -i

from the man page:

"-i
Disable interactive prompting by multiple-file commands; see the prompt command, below. By default, when this option is not specified, prompting is enabled."

-and-

"prompt
Toggle interactive prompting. By default, ftp prompts the user for a yes or no response for each output file during multiple-file commands. If interactive prompting is disabled, ftp performs the command for all specified files."