Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Posts
    8

    Unanswered: Need help with tar-ing files to another machine

    I would like to tar a directory and all it files to another machine on our network. Here is the script I'm trying to create but get the following error:

    colt 18% t1
    test start
    tar: invalid blocksize.
    done test

    #!/bin/sh
    echo "test start"
    tar cbf- temp \ rsh mmlsg1 dd "(cd /anaylsis/ICO && tar xbpf-)"
    echo "done test"


    temp is the directory on the machine called Colt
    Want to copy or move the directory to the machine mmlsg1 to the following directory structure:
    /anaylsis/ICO

    Thanks in advance for your help.

    Marty

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713
    Try this:

    #!/bin/sh
    echo "test start"
    tar cbf - temp |compress -c|rsh mmlsg1 dd of=/anaylsis/ICO/MyFile.tar.Z
    echo "done test"

    Note: tar creates a file, therefore the target must be a file name on the other machine. (and compressing save space and transmission time).

  3. #3
    Join Date
    Apr 2003
    Posts
    8

    Found out how to do it

    #!/bin/sh
    echo "test"
    tar cvfb - 20 temp | rsh mmlsg1 '(cd /analysis/ICO/ ; tar xvfBbp - 20)'
    echo "done test

    Did a search for remote machine copy and came up with this link
    http://ccd.ifa.hawaii.edu/~jim/kjtar.php3#1.6

    Marty

Posting Permissions

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