Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14
Hi, For the 'ftp' transfers, be sure you are using 'binary' mode, otherwise it will convert to DOS format. I think you may have text mode set on the Linux ...
  1. #11
    Just Joined!
    Join Date
    Feb 2007
    Posts
    2
    Hi,

    For the 'ftp' transfers, be sure you are using 'binary' mode, otherwise it will convert to DOS format.

    I think you may have text mode set on the Linux to DOS, but binary mode on the DOS to Linux, so things convert to DOS and then stay that way.

    For a command line tool, you just type 'binary' at the ftp prompt. For a GUI, you'll need to find something in the configuration/preferences to set it.

    Bob

  2. #12
    Linux User
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    262
    Quote Originally Posted by AamerAli View Post
    Thanks Ozar,

    coopstah13,

    I don't know even what you mentioned dos2unix.

    My simple problem is: i ftp my running script from linux to windows and then to other linux box.

    But my script is not working showing different errors.

    Please let me know the solution and pls also how to coz i am have been just moved to this section.?

    Thanks
    Aamer
    Did you transfer the script in "ascii mode"? This is the text mode transfer within FTP. It provides for the end-of-line translations when transferring between UNIX/Linux/Mac/Windows machines via FTP.

    The End-of-line markers are different for each of these systems.
    • Windows uses the two characters: carridge return and line feed
    • Mac uses just the carridge return
    • UNIX/Linux uses just the line feed (since 1969)

  3. #13
    Linux User
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    262
    Quote Originally Posted by bobmcgowan View Post
    Hi,

    For the 'ftp' transfers, be sure you are using 'binary' mode, otherwise it will convert to DOS format.

    I think you may have text mode set on the Linux to DOS, but binary mode on the DOS to Linux, so things convert to DOS and then stay that way.

    For a command line tool, you just type 'binary' at the ftp prompt. For a GUI, you'll need to find something in the configuration/preferences to set it.

    Bob
    The correct solution is to transfer the scripts in "ascii mode" both from the Linux to the Windows and again from the Windows to the Linux machines.

  4. #14
    Just Joined!
    Join Date
    Feb 2007
    Posts
    2
    alf55,

    Actually, since the source and destination are the "same" line ending type, a binary mode transfer will be fine.

    Using ASCII mode all the way will also work, it will just make the machines do an unecessary UNIX to DOS to UNIX line ending change sequence.

    I should have been clearer in my explanation.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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