DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Unix Query

  1. #1
    Join Date
    May 2001
    Location
    London
    Posts
    149
    Hello Guys,

    I have 2 Unix servers suppose A & B.
    I want to write one shell script in server A so that it will copy some files from server B to server A.
    In that script,It will telnet to server B and then it will goto particular directory and then
    it will copy some files from that server B to server A.
    But how will I put username & password .

    My main aim is to copy some files from server B to server A.
    Anybody has such script can post it on this mail.

    Regards,

    Paresh

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Use rcp. You can setup trusted access between the two boxes so you don't have to supply a password. man rcp will tell you all about it...
    Jeff Hunter

  3. #3
    Join Date
    May 2001
    Location
    London
    Posts
    149
    Can u tell me with suitable example

    Thanks

    Paresh

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    say you have two machines prod1 and prod2. You want to copy files from prod1 to prod2. on prod2:
    rcp prod1:/u01/oradata/* /u01/oradata
    Jeff Hunter

  5. #5
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    If you have secured shell installed, then you can use the

    scp

    for more detail on scp rcp check the man pages

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  6. #6
    Join Date
    May 2001
    Location
    London
    Posts
    149
    Hello Sambavan & all,

    Thanks for rcp command.
    Anybody has shell script to do ftp between servers.

    Thanks

    Paresh


  7. #7
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    ftp -nv << _END_
    open [server]
    user [login] [password]
    binary
    cd ...
    put, get, whatever you want
    quit
    _END_

  8. #8
    Join Date
    May 2001
    Location
    London
    Posts
    149
    Thanks Pipo and all other guys

    Paresh

  9. #9
    Join Date
    May 2001
    Location
    London
    Posts
    149
    Thanks Pipo and all other guys

    Paresh

  10. #10
    Join Date
    Dec 1999
    Location
    Alpharetta, GA, US
    Posts
    192
    YOu better use the ftp. Don't use rcp, it is unsecure.

    Good Luck
    Chan
    OCP7.3/8.0/8i/9i
    Sun Certified Sys. Admin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width