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.
Usually to get a program run with bash (which you seem to be running), you do these things:
- make sure the file is chmod'ed executable using
Code:
chmod +x file.x
- just run it; typing file.x may not (read: usually won't) run the file, because the directory isn't probably listed in the $PATH environment variable and those directories listed there are the ones where bash looks for the given command. Running works either using a full path or shortening it with the dot-file method:
Code:
/path/to/file.x
./file.x
the latter works, of course, only if the file is in the current working directory. With full path the file should run, if it's just chmod'ed executable first (only needed once). One more thing that might affect is if the place where the file resides isn't marked executable (for example if the filesystem is mounted with the noexec option, executables can't be run afaik; could be for directories too).
i get the following:
-rwxr-xr-x 1 kostis users 286352 2007-03-05 18:49 file.x
and it has a different color from all the other objects in the directory
that means it is actually executable right??
Any possibility that it is not really executable? I think that the error message has to do with permissions, but I don't know what bash does when the file is not actually an executable binary.
Also, just to eleminate variables, you might try running it as root.
I also tried to run it as superuser and i still get
-bash: /home/kostis/MYPROJECT/CODE/1d/run/file.x: cannot execute binary file
the file is executable for sure since it runs on a remote computer without any changes,
and i think executable files should run everywhere right?
do u think distribution has something to do
what type of processor are you using and waht type is the UNIX cluster using?
eg a program compiled on a SPARC processer (likley if the UNIX cluster hardware came form Sun microsystems)
will not run on a x86 (most desktop PC) based machine.
and somthing compiled on an x86 processor wont run on a sparc (or a PPC, siliconTech or any other flavour of processor )
edit: are you sure that the uni cluster is running fedora (linux) or coudl it be running any of the propiartry UNIXes like solaris
Well the truth is that i dont know how to see this (can U tell me how?)
when i log in with ssh i get the following message:
Compaq Tru64 UNIX V5.1B (Rev. 2650);
The indication "Tru64" suggests that it's actually a 64-bit machine. If the program was compiled on that platform, and you only have a 32-bit machine (ie x86 based), you'll need to recompile it on your machine.
Try running both "uname -a" and "cat /etc/*release /etc/*version" on both your machine and the remote cluster (logged in through ssh) and post the outcome.
while mine gives:
Linux linux 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux
LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32"
SUSE LINUX 10.0 (i586)
VERSION = 10.0
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.