4
votes
6answers
130 views

List all binaries from $PATH

Is there one-liner that will list all executables from $PATH in bash.
0
votes
0answers
15 views

Restore system with no execute permissions for bash and chmod [duplicate]

Good day everyone! One of my friends asked me a question: how to restore an unbootable Linux system (let it be CentOS or whatever) in the following situation: no execute permissions for bash no ...
0
votes
3answers
929 views

I get “bash: …: No such file or directory” even though the executable is there [duplicate]

Operating system: Lubuntu 13.10, 64-bit. I installed the Seamonkey browser from http://www.seamonkey-project.org/ following the instructions quoted below from ...
4
votes
1answer
111 views

What is the difference in these two bash environments?

I notice that with bash scripts, some people use a different shebang to the one that I'm used to putting at the top of my own. Can someone simplify the difference between these two? I use the ...
3
votes
2answers
245 views

Why do I have to use sh to execute scripts from CD/DVD media?

I hit again on this strange behaviour of the system. I'm running Debian 6.0.6 and had quite some troubles executing a script directly from CD/DVD. Finally I had to use: sh /media/cdrom/command to ...
2
votes
1answer
1k views

Calling java from Bash: “Cannot execute binary file”

I have this simple Bash script: #!/bin/bash java -jar ClosureCompiler/compiler.jar --js ../src/typescript.js --js ../src/ts-compiler.js --js_output_file TSCompiler.js I'm getting this error when I ...
3
votes
2answers
174 views

place the aliased version of an existing command in /usr/bin/

I use Vim a lot, and I know how I can start vim in insert mode. So I have an alias named vii in my .bash_aliases file. On other hand I use Git a lot too, and I have this line in my .gitconfig: ...
3
votes
2answers
2k views

File not found for file which is there [duplicate]

Possible Duplicate: “No such file or directory” lies on Optware installed binaries I am currently trying to get some piece of hardware to work on an embedded device. One part of ...
22
votes
1answer
1k views

Why can't root execute when executable bits are not set?

root user can write to a file even if its write permissions are not set. root user can read a file even if its read permissions are not set. root user can cd into a directory even if its execute ...
2
votes
3answers
3k views

How to find executable filetypes?

I want to find file types that are executable from the kernel's point of view. As far as I know all the executable files on Linux are ELF files. Thus I tried the following: find * | file | grep ELF ...
5
votes
1answer
473 views

What determines the path where the system searches for a file?

I am trying to get npm to work. In the process, I seem to have two versions of it installed: A corrupt one installed in ~/bin, and another I just compiled and ran make install to put it in ...
5
votes
2answers
194 views

Is it safe to remove a script file from within that script?

Imagine I have a script foo. It should be run once when the user logs in and isn't needed after a successful run. My question: Is it safe to remove the script file from within the script? E.g.: ...
1
vote
1answer
3k views

“No such file or directory” when I clearly see the file listed with correct permissions [duplicate]

Possible Duplicate: Getting “Not found” message when running a 32-bit binary on a 64-bit system Ok I feel like I'm having some sort of brain fade moment, please help me out. I ...
6
votes
2answers
4k views

#!/bin/bash - no such file or directory

I've created a bash script but when I try to execute it, I get #!/bin/bash no such file or directory I need to run the command: bash script.sh for it to work. How can I fix this?
3
votes
1answer
765 views

“Permission denied” when starting binary despite “rwx” priviledge

I am trying to run the statistics software Stata 11 on Ubuntu 11.10. as a regular user and I get the following error message: bash: xstata: Permission denied The user priviledges seem ok to me as a ...
1
vote
2answers
656 views

How do I install multiple java command-line programs?

I have a bunch of java command-line programs I've written and would like to install for all users. Building with NetBeans, I get a /dist directory which contains myprog1.jar and a /libs directory ...
53
votes
2answers
11k views

How do I clear Bash's cache of paths to executables?

When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH to find the binary, it seems that Bash remembers the path in some sort of ...
4
votes
2answers
14k views

./executable: cannot execute binary file

I have a script that works well when I ssh to the server to execute it myself, but has problems when Hudson, a continuous integration server, runs it. I am automating tests on an embedded linux ...