Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-01-2005, 03:21 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 21

Rep: Reputation: 15
shell script to check ftp communication


I need the script which suppose to check the ftp communication. script has to execute 3 times daily and script suppose to login to ftp server using username with password. If ftp works also it has to send the mail and even if it is fail also it suppose to send the mail. I have wrote the below script, while executing this script it is asking the password manually. But the password is not taking which we mention in the script. Please suggest the same or write the script and let me. It would be great help for me.


ftp script:-


Last edited by yuva_mca; 12-01-2005 at 03:24 AM.
Old 12-01-2005, 03:35 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,461

Rep: Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472
You can use your script with a regular user, creating the file .netrc in the user's homedir (~/.netrc), with the following contents:
login    usename
password user-passwd
Old 12-01-2005, 07:15 AM   #3
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
This works for me:

/bin/ftp -n << "EOS"
open machine
user myuser mypass
cd remote_dir
lcd local_dir
get "file"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script to check root user? kushalkoolwal Programming 4 09-22-2005 12:15 AM
How to check ICMP code through shell script? Thakowbbery Linux - Networking 2 07-19-2005 09:52 AM
Shell script ip address format check. rooch84 Linux - Software 6 08-18-2004 09:14 AM
Communication between shell script and program ZooL Programming 6 08-14-2004 05:44 AM
Shell-Script check if $xx is of type integer d-fens Programming 5 07-11-2003 08:38 AM

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration