Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    3

    Unanswered: Linux to Unix copy files

    Hello

    Let me declare that I'm a newbie to Unix shell.

    We have a Linux server and many Unix stations. I know how to mount/umount and NFS between Linux and the Unix machines.

    However I do not know how to copy a file/directory from Unix (hostname: sci_h12) to Linux m/c (host name in the n/w: e90testserver). I can FTP, Telnet into the Linux box but CANNOT copy files which, I think would be good to code into the shell script. 'rcp' command does not work saying 'connection refused', even though I tried with and without /username=<> /password=<>.

    Could anyone let me knwo the reason and steps/commands to solve this problem?

    Thanks!
    Mahesh

  2. #2
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    138
    Quote Originally Posted by jaymahesh
    Hello

    Let me declare that I'm a newbie to Unix shell.

    We have a Linux server and many Unix stations. I know how to mount/umount and NFS between Linux and the Unix machines.

    However I do not know how to copy a file/directory from Unix (hostname: sci_h12) to Linux m/c (host name in the n/w: e90testserver). I can FTP, Telnet into the Linux box but CANNOT copy files which, I think would be good to code into the shell script. 'rcp' command does not work saying 'connection refused', even though I tried with and without /username=<> /password=<>.

    Could anyone let me knwo the reason and steps/commands to solve this problem?

    Thanks!
    Mahesh
    Hi,
    every OS use the the same commands for FTP.
    /
    ftp xxx.xxx.xxx.xxx IP or [uname] written in /etc/hosts
    enter username and password *1
    get or mget [filename] : will send the remote-file to your local direktory
    put or mput [filename] : will send the local-file to the remote directory
    quit : exit the ftp-session

    *1 if you dont want to give user and pass for every ftp-login again :
    - look at the tread : ftp without a username and password
    Last edited by fla5do; 05-30-04 at 18:37.
    Greetings from germany
    Peter F.

  3. #3
    Join Date
    Sep 2003
    Posts
    71
    try scp ( preferred to rcp) like below and see if this works,
    assuming you have access to both machine.


    scp sci_h12:/home/user1/dir1/file1 e90testserver:/home/user1/dir2/file2

    if it complains , see what is auto path for scp by using 'which scp' at unix prompt and then use absolute path for scp in above command.





    Quote Originally Posted by jaymahesh
    Hello

    Let me declare that I'm a newbie to Unix shell.

    We have a Linux server and many Unix stations. I know how to mount/umount and NFS between Linux and the Unix machines.

    However I do not know how to copy a file/directory from Unix (hostname: sci_h12) to Linux m/c (host name in the n/w: e90testserver). I can FTP, Telnet into the Linux box but CANNOT copy files which, I think would be good to code into the shell script. 'rcp' command does not work saying 'connection refused', even though I tried with and without /username=<> /password=<>.

    Could anyone let me knwo the reason and steps/commands to solve this problem?

    Thanks!
    Mahesh

  4. #4
    Join Date
    May 2004
    Posts
    3

    Re: Linux to Unix copy files

    Hi All

    Thanks. While I'll try the 'scp' method, I've meanwhile found another way to solve this problem, without risking the security of rlogin or rcp. Basically what I did using the shell script is:

    1) Make dir in Unix(sci_h12) called /server, give full permission to it.
    2) mount from Unix/server onto my Linux path (e90testserver)
    3) Get PGM_NAME and PGM_PATH
    4) Use the above variables to copy cp -r Unix/PGM_PATH/PGM_NAME to Unix/server (dir which mounted earlier to Linux)
    5) Unmount Linux box
    6) rmdir Unix/server

    Tha above runs well as script pgm and when I later check in Linux box's path I find the whole dir (PGM_PATH/PGM_NAME) in it.

    Regds
    Mahesh

Posting Permissions

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