- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Automation of FTP processes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2000 10:26 AM
06-21-2000 10:26 AM
Automation of FTP processes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2000 10:33 AM
06-21-2000 10:33 AM
Re: Automation of FTP processes
echo "put
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2000 10:49 AM
06-21-2000 10:49 AM
Re: Automation of FTP processes
ftp hostname << END
lcd directory
put filename
.
.
.
END
I prefer this for potentially long ftp sessions because I find it more readable for future modification/debuging, but that is just a personal preference.
One thing -- both Andy's and my solution assume you have an appropriate .netrc file in place for the ftp user. Otherwise you need to send the user and password strings to the ftp as well. Since your script will be plain text on the box, that would be less than idealfor security purposes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2000 10:54 AM
06-21-2000 10:54 AM
Re: Automation of FTP processes
Thanks for reminding me of that 'little feature'. I already reported it to HP a few weeks ago, when I spotted it. Shame I forgot this time!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2000 11:32 PM
06-21-2000 11:32 PM
Re: Automation of FTP processes
-----------------------------------------
machine hpbox login userid password xxxxx
macdef init
lcd /extract
mput *
close
bye
<< 'needs blank line at the end'
---------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2000 02:30 AM
06-22-2000 02:30 AM
Re: Automation of FTP processes
Another way would be to "GET" the data from the clients (instaead of "PUT"ing it onto them) using the "wget" command. It also offers retries, incremental transfers etc. etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2000 11:21 AM
06-22-2000 11:21 AM
Re: Automation of FTP processes
ftp -n -v hostname >log |&
print -p "user login password"
print -p "put filename"
print -p "quit"
This also allows you to capture the responce of each ftp command after it is processed. It's not as simple as it sounds to do this, but possible if you need a smart ftp script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2000 07:28 AM
07-13-2000 07:28 AM
Re: Automation of FTP processes
(
echo "ftp 000.000.000.000"
echo "user anonymous root"
echo "ascii"
echo "get backup.txt"
echo "delete backup.txt"
echo "bye"
) | ftp -i -n
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2000 07:39 AM
07-13-2000 07:39 AM
Re: Automation of FTP processes
Why arent you using rdist command, to me it seems a better alternative...
Regards
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2000 07:58 AM
07-13-2000 07:58 AM
Re: Automation of FTP processes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2000 10:13 AM
07-13-2000 10:13 AM
Re: Automation of FTP processes
I personally favor, and use, the technique suggested by Dale. I'm a firm believer in scripting production (routine) processes and find that log files that can be keep for a prescribed period are invaluable in operational management. I use a generalized script of the form:
{
echo "open" $HOST
user $WHO $WHOPASS
hash
$ACTION $LOCALFILE $REMOTEFILE
close
} | ftp -i -n -v 2>&1 | tee -a $LOGFILE
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2000 10:16 AM
07-13-2000 10:16 AM
Re: Automation of FTP processes
OOPS! The scipt should have an opening quote (") before the word 'open'; no closing quote after 'open'; but a closing quote after 'close' -- to wit: ...close".
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2000 11:00 AM
07-13-2000 11:00 AM