File transfer in Linux : FTP in linux : Shell script to file trnsfer

This script use to transfer file from linux to ftp server. You can automate this file transfer by putting this file in cronjob also.

#!/bin/sh
HOST='ftp.users.qwest.net'
USER='yourid'
PASSWD='yourpw'
FILE='file.txt'

ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put $FILE
quit
END_SCRIPT
exit 0

 Please note that :

  1. Using the -n option on the ftp client program to prevent the ftp client from trying to log in immediately. That way, the ftp client does not ask for a user ID and password. No use of /dev/tty.
  2. Use the ftp client program command quote to send user ID and password to the ftp server.

78 thoughts on “File transfer in Linux : FTP in linux : Shell script to file trnsfer”

  1. I’m amazed, I must say. Seldom do I come across a
    blog that’s both educative and amusing, and let me tell you, you
    have hit the nail on the head. The problem is something which too few people are speaking intelligently
    about. Now i’m very happy that I came across this in my
    hunt for something concerning this.

  2. Unquestionably ϲonsider thɑt ԝhich you saіd.
    Your favorite justification seemeԁ to be on the web the easiest thіng to
    be mindful оf. ӏ ѕay tto ʏou, I definitely ցеt annoyed whilst
    оther folks ϲonsider issues tɦat theʏ plainly do not recognise аbout.
    Yoս maaged to hit the nail uponn tҺe top ɑnd defined out the engire thing with
    no need side effeсt , people can take a signal. Will pгobably ƅe agаin to get more.

    Thаnk you

  3. Howdy just wanted to give you a quick heads up and let
    you know a few of the images aren’t loading properly.
    I’m not sure why but I think its a linking issue.

    I’ve tried it in two different internet browsers and both
    show the same outcome.

  4. Greetings from Colorado! I’m bored to tears at work so I decided to browse your blog on my iphone during lunch break.
    I love the knowledge you provide here and can’t wait to take
    a look when I get home. I’m amazed at how quick your blog
    loaded on my phone .. I’m not even using WIFI, just 3G .. Anyhow, amazing blog!

  5. Celia Peachey, Maria’s daughter, said: She had a right to challenge much more than expected.
    Refuge strongly believes that a public inquiry
    click here into the way risk is identified”. This is often not an easy task to determine whether a person was drinking or not.

  6. This will help to determine click here where the electricity flows in different
    settings, it can increase the wear resistance of thecontacts.
    Electrical Kansas City’s electricians two work group has to have a clear coverage,
    in written form. But in order to become well versed
    in electrical techniques and safety standards.

  7. Just the other day, I went home for lunch to take my dog out for a little walk, and I met a very nice man who was driving around checking out the area where I live.
    There are many different ways to enjoy the wonder of a Disney holiday.

    Here, the Caves hotel multiplies your joy with amazing
    views.

  8. Looking for some tips, hints and help to always get to the finish line in Team Escape on the Need for Speed World.
    There are also a number of Ventures which essentially offer you bonuses
    for completing specific tasks such as opening a Shoe Factory.
    The website also says the company is “responsible for recruiting, training, equipping and sustaining the 700-member U.

  9. This design is steller! You obviously know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start my own blog
    (well, almost…HaHa!) Wonderful job. I really enjoyed what you had to say, and more than that, how you presented
    it. Too cool!

  10. hello there and thank you for your info – I have certainly picked up anything new from right here.
    I did however expertise a few technical points using this
    web site, since I experienced to reload the website many times
    previous to I could get it to load properly. I had been wondering
    if your hosting is OK? Not that I’m complaining, but slow loading instances
    times will sometimes affect your placement in google and could damage
    your quality score if ads and marketing with Adwords. Well I am adding
    this RSS to my email and could look out for a
    lot more of your respective fascinating content. Ensure that you update this again soon.

  11. Hi, Neat post. There’s an issue with your site in web explorer, might
    check this? IE nonetheless is the marketplace leader and a good part of other people will pass over your great
    writing because of this problem.

  12. This is the initiative for a lot of technical colleges and universities to produce skilled
    employees who can handle the demands of this career path. ehow, Lineman apprentice applications near Even varied industries and laboratories need their skills
    to make sure maximum productiveness for the expensive robotics and machines situated
    at the amenities.

  13. America’s Founders, by contrast, saw government as the problem, not
    the solution, and therefore crafted a framework for the new nation which sought to limit government and enable the private economy.
    First, think of the sun which is the ultimate fire that the
    person with Arsonphobia will be afraid of. Tyler could see the
    man wave his hand angrily at the cop in the station.

  14. Pingback: Homepage
  15. With havin so much written content do you ever run into any problems of plagorism or
    copyright violation? My blog has a lot of unique content I’ve either authored myself or outsourced but it seems a lot of it is popping it up all over the internet without my agreement.
    Do you know any methods to help protect against content
    from being stolen? I’d truly appreciate it.

  16. I have read a lot of Christian dating articles and what strikes
    me, is the lack of Christianity in them.
    The fishing reel’s main gears have been machined from a kind of stainless steel stock that’s distinctive to
    Daiwa. The Reformed Presbyterian Church of Scotland changed its terms of
    communion in 1822, its first constitutional move away from the Covenanted attainments.

  17. Live artwork was painted on canvas by Katrina Gonzales.
    In fact, most thermocouples are extremely non-linear over their operating ranges.
    Many people eat when they are bored or have nthing bette to do.

  18. Its such as you read my mind! You appear to grasp a
    lot about this, such as you wrote the book in it or something.
    I feel that you simply can do with some p.c. to power the
    message home a little bit, however instead of that, this is wonderful blog.

    A great read. I’ll definitely be back.

  19. Woah! I’m really enjoying the template/theme
    of this blog. It’s simple, yet effective. A lot of times it’s very
    difficult to get that “perfect balance” between usability and visual appeal.
    I must say you’ve done a amazing job with this.
    Also, the blog loads very fast for me on Firefox.
    Outstanding Blog!

  20. First of all I would like to say terrific blog!
    I had a quick question that I’d like to ask if you don’t mind.
    I was interested to find out how you center yourself
    and clear your head prior to writing. I’ve had a difficult time clearing my mind in getting my ideas
    out. I truly do take pleasure in writing but it just seems like the first
    10 to 15 minutes are wasted simply just trying to figure out how to begin. Any ideas or tips?
    Cheers!

  21. This design is incredible! You most certainly know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Fantastic job.

    I really loved what you had to say, and more than that,
    how you presented it. Too cool!

  22. You really make it seem so easy with your presentation but I find this topic to be really
    something that I think I would never understand.

    It seems too complicated and extremely broad for me.
    I am looking forward for your next post, I will try to get the hang of
    it!

Leave a Comment