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.

Related Posts

  • 63
    FTP command not found # ftp 192.168.1.56 -bash: ftp: command not found # yum -y install ftp The above command will install the ftp client package on your CentOS server. If you use a proxy server for internet access,
    Tags: ftp, server, file, linux, transfer, password, client, user, script, quote
  • 51
    What is FTP? FTP is an acronym for File Transfer Protocol. As the name suggests,FTP is used to transfer files between computers on a network. It is a standard network protocol based on TCP. FTP is built on a client-server architecture and uses separate control and data connections between the client and the server. FTP (File…
    Tags: ftp, server, transfer, file
  • 39
    You need to create a shell scrip, needed to call from a crontab, to contact a FTP server and put or get a file. You will need to modify the variable section to reflect your settings. ---------------------------------------- #!/bin/bash HOST=ftp.server.com  #This is the FTP servers host or IP address. USER=ftpuser             #This is the FTP user that has access to the server. PASS=password          #This is the password for the FTP user. # Uses the ftp command with the -inv switches.  -i turns off interactive prompting. - Restrains FTP from attempting the auto-login feature. -v enables verbose and progress. ftp -inv $HOST 
    Tags: ftp, user, server, file, script, shell, linux
  • 36
    A Shell script for killing slow MySQL queries: #!/bin/sh # Credentials for a MySQL user with PROCESS, SUPER permissions USERNAME= PASSWORD= # MySQL Server location HOST= PORT=3306 TIMEOUT=60 # 1 minute TARGET_USER= # MySQL user to monitor MYSQL="mysql -u $USERNAME --password=$PASSWORD -h $HOST -P $PORT -B" $MYSQL -N -e 'SHOW…
    Tags: user, linux, shell, script, password, server
  • 31
    What is samba server? Samba is an Open Source/Free Software suite that provides file and print services to SMB/CIFS clients. Samba is freely available, unlike other SMB/CIFS implementations, and allows for interoperability between Linux/Unix servers and Windows-based clients. Samba uses the TCP/IP protocol that is installed on the host server.…
    Tags: server, file, linux

Satya Prakash

VOIP Expert: More than 8 years of experience in Asterisk Development and Call Center operation Management. Unique Combination of Skill Set as IT, Analytics and operation management.

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

  • February 14, 2015 at 9:57 pm
    Permalink

    As the admin of this website is working, no doubt very rapidly it will be famous, due to
    its quality contents.

    Reply
  • February 14, 2015 at 10:18 pm
    Permalink

    Always require a healthy snack together with you to work or
    when you go out. It was a smaller study plus more research has to be
    done, however the answers are looking favorable.
    In these fasts you do not consume any calories, and after these periods have ended it is possible to eat what you like.

    Reply
  • February 15, 2015 at 5:22 pm
    Permalink

    Thank you for the auspicious writeup. It in truth was once
    a entertainment account it. Look advanced to far added
    agreeable from you! By the way, how can we communicate?

    Reply
  • February 16, 2015 at 5:47 am
    Permalink

    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.

    Reply
  • February 17, 2015 at 6:56 am
    Permalink

    What’s up Dear, are you actually visiting this site daily, if
    so then you will absolutely take pleasant experience.

    Reply
  • February 18, 2015 at 7:05 pm
    Permalink

    Hello, i feel that i noticed you visited my site thus i came to go back the
    favor?.I’m attempting to find issues to improve my web site!I guess its adequate to make use of
    a few of your ideas!!

    Reply
  • February 26, 2015 at 9:35 pm
    Permalink

    Thank you for sharing your thoughts. I truly appreciate your efforts and I am waiting for your further post thank you once again.

    Reply
  • February 27, 2015 at 12:08 am
    Permalink

    I was suggested this web site by my cousin. I’m not sure whether this post is written by him
    as no one else know such detailed about my difficulty.

    You are incredible! Thanks!

    Reply
  • February 27, 2015 at 2:20 am
    Permalink

    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

    Reply
  • March 10, 2015 at 3:59 pm
    Permalink

    Awesome issues here. I am very glad to look your article.
    Thank you so much and I am having a look ahead to contact you.
    Will you kindly drop me a mail?

    Reply
  • March 11, 2015 at 2:33 am
    Permalink

    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.

    Reply
  • March 11, 2015 at 2:40 am
    Permalink

    When I initially commented I clicked the “Notify me when new comments are added” checkbox and now
    each time a comment is added I get three e-mails with the same comment.
    Is there any way you can remove people from that service?

    Thanks!

    Look at my website; https://www.facebook.com

    Reply
  • March 14, 2015 at 5:24 am
    Permalink

    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!

    Reply
  • March 14, 2015 at 1:45 pm
    Permalink

    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.

    Reply
  • March 14, 2015 at 5:20 pm
    Permalink

    It’s remarkable to pay a quick visit this site and reading the views of all friends regarding this post,
    while I am also keen of getting experience.

    Reply
  • March 15, 2015 at 5:50 am
    Permalink

    It’s amazing to visit this site and reading the views of all friends regarding this article, while I am also eager of getting familiarity.

    Reply
  • March 15, 2015 at 10:57 am
    Permalink

    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.

    Reply
  • March 15, 2015 at 2:00 pm
    Permalink

    Hi! Quick question that’s completely off topic. Do you
    know how to make your site mobile friendly?
    My site looks weird when browsing from my iphone 4. I’m trying to find a template or plugin that might be able to resolve this problem.
    If you have any suggestions, please share.
    Many thanks!

    Reply
  • March 15, 2015 at 2:13 pm
    Permalink

    I like what you guys are usually up too. This kind of clever work and reporting!
    Keep up the good works guys I’ve included you guys
    to my own blogroll.

    Reply
  • March 15, 2015 at 6:52 pm
    Permalink

    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.

    Reply
  • March 16, 2015 at 5:02 am
    Permalink

    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.

    Reply
  • March 16, 2015 at 1:07 pm
    Permalink

    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!

    Reply
  • March 16, 2015 at 6:04 pm
    Permalink

    Thanks for the marvelous posting! I actually enjoyed reading it, you may be a great author.
    I will be sure to bookmark your blog and may come back sometime soon. I want to encourage you continue your great job, have a nice evening!

    Reply
  • March 16, 2015 at 10:23 pm
    Permalink

    Hi there to every body, it’s my first go to see of this weblog; this website carries amazing and in fact fine information in support of readers.

    Reply
  • March 17, 2015 at 5:32 am
    Permalink

    Very good post! We will be linking to this particularly great post on our site.
    Keep up the great writing.

    Reply
  • March 18, 2015 at 4:54 am
    Permalink

    Valuable info. Lucky me I discovered your website by chance, and I’m surprised why this coincidence didn’t happened earlier!

    I bookmarked it.

    Reply
  • March 18, 2015 at 6:04 am
    Permalink

    In fact when someone doesn’t know afterward its up
    to other users that they will assist, so here it takes place.

    Review my website – tumblr.com (tumblr.com)

    Reply
  • March 18, 2015 at 9:59 am
    Permalink

    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.

    Reply
  • March 18, 2015 at 10:20 pm
    Permalink

    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.

    Reply
  • March 19, 2015 at 2:11 am
    Permalink

    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.

    Reply
  • March 19, 2015 at 11:20 am
    Permalink

    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.

    Reply
  • March 21, 2015 at 11:51 pm
    Permalink

    I spend a pair hours every week taking images or
    new merchandise, or redoing photographs of older products.

    Reply
  • March 23, 2015 at 4:34 am
    Permalink

    You provide her with the paintings and she is going to produce samples matched pretty closely
    to your colors and will produce the labels at a reasonable value.

    Reply
  • Pingback: Homepage

  • March 29, 2015 at 10:13 am
    Permalink

    Magnificent beat ! I would like to apprentice even as you amend your site, how
    can i subscribe for a weblog web site? The account
    aided me a appropriate deal. I had been a little bit
    acquainted of this your broadcast offered vibrant clear
    idea

    Also visit my page tumblr (http://ourmedfact.tumblr.com)

    Reply
  • March 29, 2015 at 12:23 pm
    Permalink

    Indian brides in Western nations frequently put on the sari at the wedding ceremony and change into traditional Indian wear later on (lehnga,
    choli, etc.).

    Reply
  • March 29, 2015 at 5:26 pm
    Permalink

    Hеllo, I enjoy reading through your post. I wanted to write a little comment to support yoս.

    Reply
  • March 29, 2015 at 7:21 pm
    Permalink

    Greetings, I believe your website might be having browser compatibility problems.
    When I look at your website in Safari, it looks fine but when opening
    in IE, it has some overlapping issues. I simply wanted to provide you
    with a quick heads up! Apart from that, fantastic website!

    Reply
  • March 29, 2015 at 10:44 pm
    Permalink

    I love your blog.. very nice colors & theme.
    Did you design this website yourself or did you hire someone
    to do it for you? Plz respond as I’m looking to create my own blog and would like to know where u got this from.

    cheers

    Reply
  • March 30, 2015 at 5:56 pm
    Permalink

    Good site you have here.. It’s difficult to find good quality writing like yours these days.

    I really appreciate individuals like you! Take care!!

    Reply
  • March 31, 2015 at 2:18 am
    Permalink

    Hi there i am kavin, its my first occasion to commenting anyplace, when i read this article
    i thought i could also create comment due to
    this brilliant article.

    Reply
  • April 4, 2015 at 3:53 pm
    Permalink

    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.

    Reply
  • April 5, 2015 at 3:15 am
    Permalink

    I’m not sure wwhy but this blog is loading extremely
    slow foor me. Is anyone else having thjis issue or is it a problem on my end?
    I’ll check bak later on annd see if the problem still exists.

    Reply
  • April 5, 2015 at 9:01 am
    Permalink

    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.

    Reply
  • April 6, 2015 at 9:53 pm
    Permalink

    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.

    Reply
  • April 7, 2015 at 1:53 pm
    Permalink

    I like the valuable info you provide in your articles.
    I’ll bookmark your blog aand check again here frequently.
    I’m quite sure I will learn many new stuff right here!
    Good luk for the next!

    Reply
  • April 7, 2015 at 7:17 pm
    Permalink

    I read this article completely about the rrsemblance of hottest and preceding technologies, it’s awesome article.

    Reply
  • April 7, 2015 at 8:36 pm
    Permalink

    Wonderful post! We are linkiing to this great content on our site.
    Keep up the good writing.

    Reply
  • April 8, 2015 at 10:13 am
    Permalink

    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.

    Reply
  • April 9, 2015 at 10:53 am
    Permalink

    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!

    Reply
  • April 11, 2015 at 1:03 am
    Permalink

    I read this piece of writing completely regarding the resemblance of
    latest and preceding technologies, it’s awesome article.

    Reply
  • April 11, 2015 at 2:40 pm
    Permalink

    Norman Y. Mineta San José airport terminal (SJC) is found in the center
    of Silicon Valley, the biggest market of worldwide technology innovation.

    Reply
  • April 13, 2015 at 4:12 am
    Permalink

    The Hat Box- A St. Matthews, Ky. Millinery
    shop active from 1939 – 1983 at 323 Wallace Ave.

    Reply
  • April 14, 2015 at 2:32 pm
    Permalink

    Hey there! I’ve been reading your blog for some time now and finally got the
    bravery to go ahead and give you a shout out from Kingwood Texas!

    Just wanted to say keep up the good job!

    Reply
  • April 14, 2015 at 5:55 pm
    Permalink

    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!

    Reply
  • April 15, 2015 at 5:55 am
    Permalink

    Hi there, everything is going sound here and ofcourse every one is sharing facts, that’s in fact
    fine, keep up writing.

    Reply
  • April 15, 2015 at 7:17 pm
    Permalink

    Howdy! I could have sworn I’ve been to this blog before but
    after reading through some of the post I realized it’s new to me.
    Anyways, I’m definitely glad I found it and I’ll be bookmarking and checking back often!

    Reply
  • April 16, 2015 at 6:50 am
    Permalink

    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!

    Reply
  • April 18, 2015 at 12:41 am
    Permalink

    whoah this blog is fantastic i really like reading your articles.
    Keep up the good work! You understand, many persons are looking round for this info,
    you could help them greatly.

    Reply
  • June 29, 2015 at 2:32 pm
    Permalink

    This is my first time visit at here and i am in fact impressed to read everthing at one place.

    Reply
  • July 15, 2015 at 9:01 am
    Permalink

    That is a great tip especially to those fresh to the blogosphere.
    Simple but very accurate info… Thank you for sharing this one.

    A must read post!

    Reply
  • July 17, 2015 at 7:39 pm
    Permalink

    This blog was… how do you say it? Relevant!!
    Finallyy I’ve found something that helped me. Many thanks!

    Reply
  • July 24, 2015 at 11:37 am
    Permalink

    This website was… how do I say it? Relevant!! Finally I have found something that helped me.

    Thanks!

    Reply
  • August 7, 2015 at 1:20 pm
    Permalink

    Hi there, You have done an incredible job. I’ll certainly digg it and personally suggest to
    my friends. I’m confident they’ll be benefited from
    this site.

    Reply
  • December 20, 2015 at 4:22 pm
    Permalink

    One method of accelerating your writing is to time yourself drawing up bulks of paragraphs from a reading material.
    Aim to avoid squeezing the pen.

    Reply
  • February 8, 2016 at 4:33 pm
    Permalink

    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!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: