GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to ftp some files from a shell script
Operating System - HP-UX
1855786
Members
2568
Online
104103
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
back
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-04-2008 02:44 AM
06-04-2008 02:44 AM
How to ftp some files from a shell script
I have 2 hosts src,trg.trg is a ftp server.
I need a script which will run once a day in src.
It will pick the files then put them into the trg host using ftp.
I saw one thread but my requirement is more than one file need to be ftp'd.
I need a script which will run once a day in src.
It will pick the files then put them into the trg host using ftp.
I saw one thread but my requirement is more than one file need to be ftp'd.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2008 03:06 AM
06-04-2008 03:06 AM
Re: How to ftp some files from a shell script
See this previous thread - http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1212577427760+28353475&threadId=1046219
Instead of using PUT you can use MPUT for multiply files.
regards,
ivan
Instead of using PUT you can use MPUT for multiply files.
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2008 03:28 AM
06-04-2008 03:28 AM
Re: How to ftp some files from a shell script
Hi,
If u have SSH installed i think u can easily do that by copying the rsa keys of the userA on the source server to the ~homedir_of_userA/.ssh/auhorized_keys file in the target server.This way it will not promt password and scp will do your job.
Its too fast as well
Hope that helps
Cheers
Marvik
If u have SSH installed i think u can easily do that by copying the rsa keys of the userA on the source server to the ~homedir_of_userA/.ssh/auhorized_keys file in the target server.This way it will not promt password and scp will do your job.
Its too fast as well
Hope that helps
Cheers
Marvik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2008 03:37 AM
06-04-2008 03:37 AM
Re: How to ftp some files from a shell script
DESTSYS=mytargetsys
DESTDIR=/tmp/here
USER=myuser
PASSWD=mypasswd
ftp -n << EOF
connect $destinationsystem
user $USER $PASSWD
prompt
bi
cd $DESTDIR
mput *
by
EOF
or
(cat < connect $destinationsystem
user $USER $PASSWD
prompt
bi
cd $DESTDIR
EOF
for i in *.img # or here any script to get th
do
echo put $i
done
echo by
)| ftp -n
to get a log file
before you can do
exec >/tmp/ftp$$.log 2> /tmp/ftp$$.err
DESTDIR=/tmp/here
USER=myuser
PASSWD=mypasswd
ftp -n << EOF
connect $destinationsystem
user $USER $PASSWD
prompt
bi
cd $DESTDIR
mput *
by
EOF
or
(cat <
user $USER $PASSWD
prompt
bi
cd $DESTDIR
EOF
for i in *.img # or here any script to get th
do
echo put $i
done
echo by
)| ftp -n
to get a log file
before you can do
exec >/tmp/ftp$$.log 2> /tmp/ftp$$.err
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP