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!
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 thought I might add the following output when I run vi on the file(which might provide more assistance in helping me)
...
"DBConfig_RHEL_SAM_10_0_R5.bin" [converted] 3625179L, 632554463C
why do you need to edit the file in vi and thus convert the file's format ? methinks that mite add corruption while trying to execute the file.
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
maybe you need to be root; but the error wouldve stated that instead of saying 'command not found'.
can you please re-run the command and copy-and-paste both the command and the error in your repsonse in code tags -- i'm assumng theres a typo somewhere (like '1' or 'I' instead of 'l').
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.