Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Posts
    17

    Unanswered: Download files using shellscript

    Hi,
    iam new to shell script how to download files from one Linux box to other Linux box folder.

    example :

    Box1: folder---/home/test/*
    Box2:folder---/home/download/


    using FTP shellscript..?

    Thanks lot.
    Ram

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1

    FTP in script

    Use <<EOF on the ftp command. The shell input is read up to EOF

    e.g.
    ftp -nv hostn <<EOF
    user xx xxpw
    cd dir
    get file
    EOF

  3. #3
    Join Date
    Oct 2005
    Posts
    17
    Quote Originally Posted by pdreyer
    Use <<EOF on the ftp command. The shell input is read up to EOF

    e.g.
    ftp -nv hostn <<EOF
    user xx xxpw
    cd dir
    get file
    EOF

    How to do it from windows machine to unix machine..?

    FOLDER IN WINDOWS: /test
    Folder in unix: /home/location


    how to download files from windows to unix box folder..

    Thanks lot.

  4. #4
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1

    ftp script for windows

    You'll have to create an input file
    Code:
    C:\PetrusD>type ftpscript.bat
    @echo off
    echo user anonymous anonymous@unknown.com >c:\tmp\ftpcmd.txt
    echo dir >>c:\tmp\ftpcmd.txt
    echo quit >>c:\tmp\ftpcmd.txt
    ftp -s:\tmp\ftpcmd.txt -vn ftp.microsoft.com

Posting Permissions

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