- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script for FTP
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
05-28-2002 07:51 PM
05-28-2002 07:51 PM
We are running hp 10.20
Is it possible to write script (file) for the FTP?
User
Pass
And to copy all files from current directory to another ftp server.
where should be saved this script (location)
Best regard to all
Goran
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 07:58 PM
05-28-2002 07:58 PM
Re: script for FTP
This subject comes up frequently:
You can do a search using 'ftp script' from the search bar <-- or you could look at this posting:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x83e45f260cafd4118fef0090279cd0f9,00.html
There is also some interesting information that can be found in the 'netrc' man pages.
Cheers
~Michael~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 08:29 PM
05-28-2002 08:29 PM
Re: script for FTP
http://us-support3.external.hp.com/emse/bin/doc.pl/sid=604d7d7a0e4f4db81f?todo=search&searchcategory=ALL&rn=100&presort=rank&searchtext=ftp%2Bscript&searchcriteria=allwords&searchtype=SEARCH_FORUMS
Hope it helps ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 10:46 PM
05-28-2002 10:46 PM
Re: script for FTP
Hi,
Here is a small script that does what
you have requested:#!/bin/ksh
#
# In this script tohost is the name of the machine you want to
# copy files to.
# user is the users name on tohost
# passwd is the users password on tohost
#
# Replace mput ftp* with whatever is suitable for your use
# or add more ftp-commands
#
# The BIG security-issue with this method often is that the
# user/password is visible in a file!!!
# I have tried to reduce this risk here by having the user
# pass user/password as arguments to the script:
#
# usage:
# ftp_aut tohost user password
#
#
#
tohost=$1
USERNAME=$2
PASSWORD=$3
(
echo "
open $tohost
user $USERNAME $PASSWORD
mput ftp*
close
"
) | ftp -i -n
echo "exit script"
Regards
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 11:49 PM
05-28-2002 11:49 PM
Re: script for FTP
Perhaps this information is important for you,
please read the man pages for .netrc.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 10:37 PM
05-29-2002 10:37 PM
Re: script for FTP
#! /usr/bin/sh
ip_address=10.10.10.10
user=user
password=password
ftp -n $ip_address <<-EOF
user $user $password
cd /tmp
lcd /tmp
bin
mput *
bye
EOF
Gabriele Facchini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2002 08:14 PM
05-30-2002 08:14 PM
Re: script for FTP
This shoud be my first script on Hp
and sorry
Can I use any editor to create it under #! /usr/bin/sh
The name "out"
What shoul be extension of the file.
sorry to all.
best regard
Goran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2002 08:23 PM
05-30-2002 08:23 PM
Solution# vi myscript
..that will bring you to vi mode. And in "vi" enter your script .. (I'm using the previous posting example given..)
#! /usr/bin/sh
ip_address=10.10.10.10
user=user
password=password
ftp -n $ip_address <<-EOF
user $user $password
.....
When you're done save the file
# chmod 500 myscript
Then just run it ..
# ./myscript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2002 01:54 PM
06-01-2002 01:54 PM
Re: script for FTP
Goran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2002 09:12 AM
06-03-2002 09:12 AM
Re: script for FTP
#!/bin/ksh
ftp -n
user
bin
prompt
mput *
FTP
********
You should use prompt before using mput if you want to upload/download mulitple files. If you don't use, it will ask for your confirmation before uploading/downloading the files.