- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ftp protocol usage mode
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
03-07-2003 03:26 AM
03-07-2003 03:26 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 03:30 AM
03-07-2003 03:30 AM
Re: ftp protocol usage mode
ftp -n
user
...
ftp commands
...
EOD
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 03:48 AM
03-07-2003 03:48 AM
Re: ftp protocol usage mode
if so, only commands supported by ftp protocol can go in between EOD signs, is that right?
what if i wanted to use a loop or other script structure?
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 03:56 AM
03-07-2003 03:56 AM
Re: ftp protocol usage mode
1. Have the ftp command in the loop.
2. Use a temporary command file instead of the 'here' document in the example I gave you. Write the header information to the file first (user command plus maybe cd and bin) then in your loop, write the 'put' commands or whatever then run ftp with the temp file as it's standard input. Example...
TMPF=/tmp/ftp.${$}
cat > ${TMPF} << EOD
user
cd
bin
EOD
In you loop, include the relevant commands
print "put
Finally run ftp
ftp < ${TMPF}
rm ${TMPF}
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 04:09 AM
03-07-2003 04:09 AM
Re: ftp protocol usage mode
the problem is more simple that it perhaps seems to be. after initializing ftp connection several commands are to be executed (loops among other things). these commands - as far as i'm concerned - can belong to the pool supported by ftp protocol?
regards,
matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 04:14 AM
03-07-2003 04:14 AM
Re: ftp protocol usage mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 06:47 AM
03-07-2003 06:47 AM
Re: ftp protocol usage mode
To summarise the other replies - you're writing a script that will build a script full of ftp commands. When you execute the script it builds the ftp script then executes it. If you need to have additional non-ftp commands looping - perhaps you want to use several put commands then your script needs to build those put commands and write them into the ftp script.
The attached script is one I use to ftp files newer than a certain date to a web server and illustrates this kind of looping.
regards,
Darren.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 06:57 AM
03-07-2003 06:57 AM
Re: ftp protocol usage mode
00 15 * * * /run/this/ftpscript
/run/this/ftpscript :
ftp -v server1 mv file1 file1.old
mv file2 file2.old
--------
And
/run/this/ftp.input :
put file1
put file2
close
bye
----------------
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 09:42 AM
03-07-2003 09:42 AM
SolutionInstead, install the secure utilities, and use scp instead. This very easily encrypts the file transfer using public/private key swapping. It is very easy to script, and you have no need of passwords IF it is installed correctly.
I've attached my document that shows step-by-step how to use secure copy (scp) and secure shell (ssh). Its worth the time and effort to make this work. The utilities are free from:http://www.software.hp.com/ISS_products_list.html.
Chris