From: flyfshmn <flyfshmn@carolina.rr.com>
To: linux-newbie@vger.kernel.org
Subject: FTP Script - TOTAL NEWBIE HERE!!!
Date: Thu, 15 Feb 2007 10:58:07 -0800 (PST) [thread overview]
Message-ID: <8991524.post@talk.nabble.com> (raw)
Hello all,
1st post here. Anyway, here is my delema.
I need to ftp a file (a new file is created daily) to a remote server.
4 things need to happen.
1) Change directories. (done)
2) FTP file to remote site. (done)
3) Verify file successfully arrived at remote site. (havnt a clue)
4) Delete file from local machine.
What I have at this point is this....all gathered from google searches
#!/bin/bash
cd /dsds/dsds
lftp -c 'open -e "put filename" ftp://uername:pass@hostip/dir/dir
At this point - I can manully make this happen. What I dont know is how do I
create a script that will automatically insert file name (may use mput *.*),
verify the success and then delete the file. I will not have access to snmp
traps to actually know if the file was successful, but at least if it fails,
then it wont be deleted. The files that are created have the current date as
part of the file name, so this info may be useful for the variable for the
put.
Again - our "script writer" is no longer with the company and I have this
task that needs to be automated as best as possible.
TIA
Fly
--
View this message in context: http://www.nabble.com/FTP-Script---TOTAL-NEWBIE-HERE%21%21%21-tf3235480.html#a8991524
Sent from the linux-newbie mailing list archive at Nabble.com.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next reply other threads:[~2007-02-15 18:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-15 18:58 flyfshmn [this message]
2007-02-18 15:06 ` FTP Script - TOTAL NEWBIE HERE!!! Jim Reimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8991524.post@talk.nabble.com \
--to=flyfshmn@carolina.rr.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.