Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
those caret-M's (^M) means that the file has microsoft line endings. is it possible to download the file directly to the linux machine to mitigate the possibility of introducing errors from the microsoft machine ?
i never heard of this command :set fileformat=unix (was this done in vi ?) .
Yes is was done in vi.
Also, I have now downloaded the file directly to my linux machine.
The above is why I'm having to download the file from the usb in binary mode.
No! No! NO! You don't need to 'download' from the USB stick at all! You simply need to copy the file, and on that level, there is no binary vs. ASCII mode. Files are files are files in a filesystem.
The binary mode download needs to be done at the original network transfer level, which you have indicated was done using FTP. If network file transfers must be done using FTP, then it must be done in binary mode. A better method is to use scp (secure copy), in which all transfers are 'binary' mode.
It seems clear at this point that the file you have is corrupted by the non-binary file transfer, and you will have to re-acquire it using proper methods. Perhaps the original source has, or can create, an MD5 hash to use for comparison at your destination, just to make sure the file arrives intact.
i didnt see the :set fileformat=unix from anyone else in this thread so i am assuming that the person who gave you that file gave you that instruction. if the file originally has the ms ^M's then the file was probably fubar to begin with (edit: or are you running this to correct the issue of downloading it to windows first then sneakernetting it to linux; if you download directly you wouldnt have to do this step ?). if that instruction didnt come from the originator i would redownload the file and just run it (with as few middle-men as possible).
whoops, i just saw the previous post. what does this return