I want to upload a file to remote server through ftp
daily.Can anyone suggest how to make a shell script for
that.I hv credentials for that ftp



I want to upload a file to remote server through ftp daily.Can anyone suggest how to make a shell s..

Answer / geichel

#!/bin/bash

/bin/ftp -inv ip_address_of_target_station<<ENDFTP
user ftpusername ftpuserpassword
cd folder_on_target
bin
lcd folder_on_local
put filename.txt
bye
ENDFTP

# Alternatively some ftp packages let you put a script in
$HOME/.netrc

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Shell Script Interview Questions

Explain about "s" permission bit in a file?

1 Answers  


What are the different shells available?

3 Answers  


What is the command to find out today's date?

1 Answers  


Given a file find the count of lines containing the word "abc".

1 Answers  


Create a bash shell script that reads a line from the user consisting of 5 words and then prints them out in reverse order. Name this script "reverse.sh"

1 Answers  


How will you pass and access arguments to a script in linux?

1 Answers  


Where are cowrie shells found?

1 Answers  


Hi, i want to zip the files that generates automatically every few minutes (files generated are in .arc extension)....any body write a script for this... thanks in advance

5 Answers   HP,


If you have a string "one two three", which shell command would you use to extract the strings?

5 Answers  


what is the difference between sh & bash shell?

1 Answers  


How important is shell scripting?

1 Answers  


In a single command how do you run the previous command in the command prompt.

5 Answers  


Categories