- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help me please .....i am newbie
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
02-22-2003 12:26 AM
02-22-2003 12:26 AM
Help me please .....i am newbie
100.100.102.7
100.100.102.9
100.100.100.222
I want to make script to extract *.tar file
that placed on 100.100.100.222 to 3 other servers (100.100.102.6;100.100.102.7 and 100.100.102.9) at once running script.
If I want run that script on 100.100.102.7, how to make this work?
In manually I use this statement:
on 100.100.102.6 machine :
$pwd
$/u/pusat
$ftp 100.100.100.222
220 appr FTP server (Version 1.1.214.5 Tue Nov 16 09:39:15 GMT 19.
Name (100.100.100.203:lin): kamal
Password : kamal
230 User kamal logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>pwd
"/u/linkdev" is current directory.
ftp>cd bawa
250 CWD command successful.
ftp>mget AR072.tar AR083.tar IV075.tar
mget AR072.tar ? y
200 PORT command successful.
150 Opening BINARY mode data connection for IV018.tar (60928 bytes).
226 Transfer complete.
60928 bytes received in 0.1 seconds (595.00 Kbytes/s)
.....
.....
ftp>bye
$pwd
$/u/pusat
$tar xvf IV075.tar
tar: blocksize = 20
x clientproc/IV075.p, 13071 bytes, 26 tape blocks
x clientproc/IV075a.p, 8926 bytes, 18 tape blocks
x proc/IV075aload.p, 1123 bytes, 3 tape blocks
x proc/IV075bload.p, 3101 bytes, 7 tape blocks
x proc/IV075del.p, 1396 bytes, 3 tape blocks
x proc/IV075load.p, 1314 bytes, 3 tape blocks
x proc/IV075save.p, 4528 bytes, 9 tape blocks
I repeat the above proseses on 100.100.102.7 and 100.100.102.9 machines.
How to make one script that running on one of the 3 servers above to make extract *.tar file
that get from 100.100.100.222 machine.
Example if on 100.100.100.222 in directori /u/linkdev/bawa have AR072.tar IV068.tar MT065.tar then I execute script
that will ask me like this:
Need to extract what file ?
AR072.tar;AR089.tar;IV090.tar;etc then push Enter, after that the script automatic running
on 100.100.102.6 /u/pusat:
$tar xvf AR072.tar
$tar xvf AR089.tar
$tar xvf IV090.tar
on 100.100.102.7 /u/depo:
$tar xvf AR072.tar
$tar xvf AR089.tar
$tar xvf IV090.tar
on 100.100.102.9 /u/depo1:
$tar xvf AR072.tar
$tar xvf AR089.tar
$tar xvf IV090.tar
Please help me .......becoz i am newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2003 01:08 AM
02-22-2003 01:08 AM
Re: Help me please .....i am newbie
First is to configure rcp access on all the four servers. i.e from 100.100.102.7 configure rcp access to all other 3 servers.
Do this using /etc/hosts.equiv or .rhosts of the user by which you will be running the rcp script.
Then write a script which does rcp some thing like
rcp 100.100.100.222:/u/linkdev/bawa/*.tar 100.100.102.6:/u/pusat
have this line for each servers and then run remsh 100.100.102.6 -n "cd /u/pusat; tar xvf ....."
and do this too on all servers so rcp and remsh will solve all u'r purpose from one server. Have this script run on 100.100.102.7.
let me know if u need more help..
rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2003 07:23 AM
02-22-2003 07:23 AM
Re: Help me please .....i am newbie
From your "100.100.102.222" machine:
#Script Start
PARAMS="100.100.100.6:pusat 100.100.102.7:depo 100.100.102.9:depo1"
cd /u/linkdev/bawa
for PARAM in $PARAMS
do
SERVER=`echo $PARAM|awk -F":" '{ print $1 }'`
DIR=`echo $PARAM|awk -F":" '{ print $2 }'`
rcp *.tar $SERVER@root:/u/$DIR
echo "Need to extract Tar's files? (Y/N) \c"
read ANSW
if [ $ANS = "Y" ]
then
remsh $SERVER -l root -n 'cd /u/$DIR;tar xf *.tar'
fi
done
#Script End
To use rcp/remsh commands successfully you need create in the root user home directory of each target machines (100.100.100.6 100.100.102.7 100.100.102.9) a file named .rhosts, you can do this in each machine under root login by the following commands:
#cd
#echo "100.100.102.222 root" > .rhosts
#chmod 555 .rhosts
#chown root:sys .rhosts
After this, the above scriptfile should work without problems.
I hope to have understood you and that my answer is useful for you. If you require some adjustment you don't doubt to tell it to me,
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2003 08:03 AM
02-22-2003 08:03 AM
Re: Help me please .....i am newbie
Pls be careful with the ./rhosts treatment, to prevent an overwrite action I prefer that use the following action instead:
#echo "100.100.102.222 root" >> .rhosts
With ">>" you append a new line on .rhosts file, if the file not exist you will create anyway.
To improve the script question message use:
echo "Need to extract Tar's files into $PARAM node? (Y/N) \c"
Remember, you must set executable permission at script file: chmod 755
This procedure has been thought to be executed by the user "root".
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2003 06:23 PM
02-22-2003 06:23 PM
Re: Help me please .....i am newbie
https://payment.ecommerce.hp.com/cgi-bin/swdepot_parser.cgi/cgi/try.pl?productNumber=T1471AA&date=
follow the attached document to exchang public keys.
Good Luck.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com