Find the answer to your Linux question:
Results 1 to 3 of 3
please help!!!!!!!!!!!!!!!!!!!!! I have been spending a several days on this. I have created the .netrc file machine ***.net username anonymous password lanshanhongye When I source .netrc it shows that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    1

    a shell for automatic download always give error


    please help!!!!!!!!!!!!!!!!!!!!! I have been spending a several days on this. I have created the .netrc file
    machine ***.net
    username anonymous
    password lanshanhongye

    When I source .netrc
    it shows that
    -bash: machine: command not found

    So that I add the user name and password into the shell file as follows

    !/bin/bash
    ftp -i <<!
    open ####.net
    anonymous
    lanshanhongye
    binary
    cd /pub/
    lcd /disk2/pub
    prompt
    mget *
    bye
    !

    Please login with USER and PASS.
    Please login with USER and PASS.
    KERBEROS_V4 rejected as an authentication type
    ?Invalid command
    ?Invalid command


    Thanks in advance!!!!!

  2. #2
    Just Joined!
    Join Date
    Aug 2011
    Posts
    35
    try using lftp:
    lftp ftp://userassword@server -d -e "commands ; quit"

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    You don't source the .netrc file. Just let FTP use it.

    The format of your .netrc file is incorrect. Try:
    Code:
    machine localhost
      login anonymous password whatever
    Also make sure permissions are correct:
    Code:
    chmod 0600 ~/.netrc
    But based upon what you are trying to do, you should really use allwimb's suggest.

  4. $spacer_open
    $spacer_close

Posting Permissions

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