LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-17-2012, 09:23 AM   #31
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by schneidz View Post
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.

Cheers
 
Old 11-17-2012, 09:25 AM   #32
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
I thought I might add the following output when I run vi on the file(which might provide more assistance in helping me)

#!/bin/sh

PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
BLOCKSIZE=32768
JRESTART=3
JREREALSIZE=137188985
ARCHSIZE=8610
RESSIZE=588
RESREALSIZE=19266254
ARCHREALSIZE=282110589
LAX_NL_CURRENT_VM=jre/bin/java
LAX_INSTALLER_UNIX_INTERNAL_PROPERTY_0=bin/java
DEFAULTPERMS=002
INSTALLER_OVERRIDE_VMLIST="1.4+"
INSTALLER_STDERR_REDIRECT="/tmp/5620_SAM_dbconfig_stderr.txt"
INSTALLER_STDOUT_REDIRECT="/tmp/5620_SAM_dbconfig_stdout.txt"
INSTALLER_HEAP_SIZE_INITIAL="16777216"
INSTALLER_HEAP_SIZE_MAX="968884224"
INSTALLER_OPTIONAL_ARGS="-XX:MaxPermSize=256m"
RESOURCE_DIR="Linux"
DEFAULT_UI_MODE="GUI"
#!/bin/sh
@
"DBConfig_RHEL_SAM_10_0_R5.bin" [converted] 3625179L, 632554463C


Cheers

Carlton
 
Old 11-17-2012, 09:49 AM   #33
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904
Quote:
Originally Posted by carltonp View Post
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.

--- rod.
 
Old 11-17-2012, 10:03 AM   #34
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,688

Rep: Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775
Quote:
Originally Posted by carltonp View Post
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.

Last edited by schneidz; 11-17-2012 at 10:24 AM.
 
Old 11-17-2012, 10:07 AM   #35
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,688

Rep: Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775
Quote:
Originally Posted by carltonp View Post
Hi Schneidz

I tried installing the compress package and I got the following output:

[root@localhost ~]# sudo yum install compress uncompress ncompress
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
No package compress available.
No package uncompress available.
No package ncompress available.
Error: Nothing to do
[root@localhost ~]#

Can you please let me know what I need to do to install the uncompress package successfully?

Cheers

Carlton
maybe you can enable rpmfusion.com's repo or maybe you can create a symlink to gunzip.
 
Old 11-17-2012, 10:09 AM   #36
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,688

Rep: Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775
Quote:
Originally Posted by carltonp View Post
...
Also, I have now downloaded the file directly to my linux machine.

Cheers
out of curiosity, how was the file downloaded (http , scp , ftp , ...) ?
 
Old 11-17-2012, 11:30 AM   #37
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz View Post
maybe you can enable rpmfusion.com's repo or maybe you can create a symlink to gunzip.

Hi, can you please tell me how to create a symlink to gunzip?
 
Old 11-17-2012, 11:33 AM   #38
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz View Post
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 was told that to fix the following error I need run vi on the file and then do :set fileformat=unix

bash: ./DBConfig_RHEL_SAM_10_0_R5.bin: /bin/sh^M: bad interpreter: No such file or directory
 
Old 11-17-2012, 01:00 PM   #39
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Hi, can you please tell me how to create a symlink to gunzip?
 
Old 11-17-2012, 01:25 PM   #40
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Hi all,

I have been trying to run the following command but keep on getting the error message 'command not found'

do: 'ln -s /usr/bin/gunzip /usr/bin/uncompress

Can someone please show me how to successfully run this command?

Cheers
 
Old 11-17-2012, 01:34 PM   #41
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,688

Rep: Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775
Code:
ln -s /usr/bin/gunzip /usr/bin/uncompress
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
Code:
 which ln

Last edited by schneidz; 11-17-2012 at 01:38 PM.
 
Old 11-17-2012, 01:37 PM   #42
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
It returns

/bin/ln
 
Old 11-17-2012, 01:41 PM   #43
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Quote:
Originally Posted by carltonp View Post
...
Also, I have now downloaded the file directly to my linux machine.
...
Then you should simply execute it (what you did before you started this thread) without any modifications.

If it doesn't work, please post all error-messages.

Markus
 
Old 11-17-2012, 01:42 PM   #44
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,688

Rep: Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775
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').
 
Old 11-17-2012, 01:47 PM   #45
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
schneidz

I am root. Please see below output

Quote:
[root@localhost /]# do: 'ln -s /usr/bin/gunzip /usr/bin/uncompress'
bash: do:: command not found
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Converting a binary file from little endian to big endian jaepi Programming 6 09-05-2011 09:51 PM
'Cannot Execute Binary File' issue kickout Linux - Software 4 09-16-2010 10:54 PM
Tar archive from windows to linux, binary file issue jblevins Linux - General 3 04-13-2009 11:50 PM
converting a hex file to binary linx win Programming 3 07-20-2006 03:04 AM
j2sdk installation issue - cannot execute binary file mcolley73 Linux - Software 2 04-18-2004 12:40 PM


All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration