The permission bit in a file mode that allows a file to be run as a program. Also, questions related the format of program files, and to locating and executing program files.

learn more… | top users | synonyms

4
votes
3answers
2k views

Why can't I run programs on another partition in Linux?

So for convenience, I store all my data on my Windows partition so that I can access my data easily from both Linux and Windows. However, I tried compiling a C++ program with g++, and found out that I ...
4
votes
3answers
819 views

Directories with binary files in Linux

I noticed that when I install new application there are a few possible directories where the resulting binary file will be placed. You can install with packaging manager, compile with make, ...
2
votes
1answer
2k views

How to verify if tmux is properly installed on Mac OSX

I've just tried installing tmux from source (via installing libevent first). The installation seemed fine, without throwing any obvious error. But when I typed tmux in iTerm2, it returned "command not ...
2
votes
1answer
1k views

Problem with executing Firefox version 9.0.1

I cannot run firefox version 9.0.1. When i try to execute the binary firefox I get an error -bash: ./firefox: cannot execute binary file. The info returned by file is as follows: firefox: ELF 32-bit ...
3
votes
1answer
110 views

Access PgSQL executables from anywhere

I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command pg_dump: for ...
6
votes
3answers
3k views

If I see a process running using ps, how can I find the executable?

If I can see a process running using ps -e, how can I find the file which launched it?
4
votes
3answers
6k views

Running python script from terminal without .py extension

I want to call a python script script.py from the terminal by simply typing script. Is this possible? If so, how? I know I can avoid typing python script.py by adding #!/usr/bin/env python to the top ...
1
vote
1answer
233 views

permission and user/group of a program executed through a script

I am curious, in the following scenario, what kind of permission does a shell script or Java program has (owner/group/other)? There is a script called run.sh, and it in turn calls a Java program ...
1
vote
3answers
4k views

Cannot execute binaries in Ubuntu : file not found

When I try to run any executable file a file not found error occurs. Sometimes it says nothing but doesn't do anything. For example, when I execute ./blah-blah.bin it fails finding the file when it ...
8
votes
5answers
6k 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
587 views

Set executable heap

The execstack program can be used to mark ELF-binaries as needing an executable stack. Is there a similar way to mark the heap as executable? Preferably for a single binary but if that's not ...
27
votes
5answers
1k views

Execution of possibly harmful program on Linux

I'm writing a program that will test programs written by students. I'm afraid that I can't trust them and I need to make sure that it won't end up badly for the computer running it. I was thinking ...
0
votes
0answers
248 views

python error using an executable with Z shell

I'm getting this error from the Unix Z shell (I'm on Mac): python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or ...
1
vote
1answer
189 views

How to search folder with only x set (execution) permission

I have read that if folder has only x set permission to execute it actually means that you are permitted to search this directory. So how to search it?
3
votes
1answer
891 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 ...
3
votes
3answers
5k views

Where do executables look for shared objects at runtime

The title is pretty explicit. I understand how to define include shared objects at linking/compile time. However I still wonder how do executables look for the shared object (*.so libraries) at ...
9
votes
3answers
464 views

Is there a way to execute a native binary from a pipe?

echo 'main(){}' | gcc -xc - -o /dev/stdout | ??? Is there a way to run the output binary on a unix-like system? EDIT: I needed it to run the output of g++ in a sandboxed environment where I can't ...
2
votes
2answers
763 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 ...
3
votes
1answer
941 views

When executable files aren't [duplicate]

Possible Duplicate: Can't execute some binaries in chroot environment (zsh: Not found) Today I ran into something that has me stumped. A co-worker is working with a specific ...
2
votes
1answer
446 views

Problem when installing “ia32-libs”

I'm using x64 Ubuntu. A few months ago I accidentally messed up the groups/owners of all files on /, but managed to fix it using a VirtualBox install of Ubuntu. Now I'm running into a problem that I ...
2
votes
1answer
210 views

Can I use the same binary on Linux, *BSD and Illumos?

I want to know, if I can use the binary of a program without modification on the three systems? After all they are all Unices. I talk about the same architecture.
11
votes
5answers
5k views

How can I use environment variables in my shebang?

I have a Python script that need to be run with a particular python installation. Is there a way to craft a shebang so that it runs with $FOO/bar/MyCustomPython?
5
votes
1answer
137 views

How would one detect if external command exists in a script?

Is there a way to detect if an external command exists (i.e. wget, svn)? More specifically today, i was trying to run one of my scripts i wrote and the person didn't have wget or svn installed. The ...
0
votes
0answers
29 views

Problem with calling program from the command line [closed]

Note: this is a cross post with this post on SO. I am trying to build a command line wrapper in Python 3 for an exiting command line tool called 'spooky' and I am having a hard time understanding ...
8
votes
1answer
1k views

How to run my own program without specifying its path

Let's suppose I have compiled something and I run it like so: $ /path/to/my/executable/mycmd Hello World What do I need to do to run it like $ mycmd Hello World from everywhere in my computer? ...
3
votes
3answers
359 views

How to grep recursive UNIX tree results along with each tree node?

Here is what I do tree -R /Applications/NetBeans/NetBeans\ 7.0.app/ | perl -e 'while (<>) { print if /java$/ }' but of course this doesn't return the result I want. What I want is to display ...
3
votes
4answers
3k views

File permission execute only

How can I set file to be executable only to other users but not readable/writable, the reason for this I'm executing something with my username but I don't want to give out the password. I tried : ...
1
vote
2answers
240 views

Weird executabe behaviour

I have a server machine with ubuntu 9.10. I am trying to put in place an executable, which turns out to be the latest flashplayer (debugger version). Somehow the file appears as present and ...
4
votes
2answers
2k views

Problem with $PATH and executable file

I am a complete unix noob so please forgive my simple question. I have a unix executable file located in a directory I generated. I believe I need to get this directory in my $PATH so that the unix ...
4
votes
3answers
273 views

Why do you need the “./” when executing programs in the current directory? [duplicate]

Possible Duplicate: Why do we use “./” to execute a file? It seems redundant and gets annoying after a while -- is there a way to change this? If not, can somebody explain the ...
5
votes
3answers
3k views

The way to use `/usr/bin/env sed -f ` in shebang?

Typing /usr/bin/env sed -f in terminal works. But if use it as a shebang, #!/usr/bin/env sed -f s/a/b/ The script will be fail to execute: /usr/bin/env: sed -f: No such file or directory I ...
6
votes
1answer
182 views

Bash executes a different file from the one prompted, even when providing full path

I imagine there's a environment variable or some setting I'm unaware of, but this is driving me nuts. baco:~ # ls -la /root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin -rwxr-x--- 1 ...
4
votes
2answers
157 views

Can an executable know where it is stored?

Can an executable know where it is stored? For my open source project, I wrote a small bash script to automate some operations. The script lies at the root of the project and performs its tasks on ...
7
votes
2answers
400 views

Detect if an ELF binary was built with gprof instrumentation?

Is it possible to check if given program was compiled with GNU gprof instrumentation, i.e. with '-pg' flag passed to both compiler and linker, without running it to check if it would generate a ...
2
votes
1answer
540 views

Cannot open shared object file when using D compiler

I had ldc2 and gdc compiled from source and working up until a month ago. Nothing has changed, except I can't remember the variable(s) I would set in the terminal to get ldc2 and gdc to work. I get ...
12
votes
1answer
748 views

Why does the file command say that ELF binaries are for Linux 2.6.9?

Whenever I run file on an ELF binary I get this output: [jonescb@localhost ~]$ file a.out a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked ...
25
votes
2answers
11k views

Getting “Not found” message when running a 32-bit binary on a 64-bit system

I have currently a strange problem on debian (wheezy/amd64). I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path /chr_path/. To make things ...
3
votes
2answers
2k views

Running C Programs on Linux

I watched a video lecture today that introduced C and things like how to make a C program that will run in Linux. I followed the steps given and now I'm stuck with a bit of a problem. I created my C ...
8
votes
2answers
4k views

Creating Static Binary

I installed an application [ e.g. fdisk ]. But it required libraries for execution. I am looking for utility/tool which will help me to create a static binary from already installed binaries. So that ...
0
votes
1answer
5k views

Modelsim for ubuntu

I am looking to download modelsim for ubuntu. But the site gives only .exe file. Can I still install the software? Does modelsim exist for ubuntu? If yes, where can I find it? Thank you.
1
vote
1answer
330 views

How to block the execution of files owned by root through lighttpd?

I've created a group and a user to run lighttpd. I would like to run from the web server only files that have these permissions (myuser:mygroup). I don't want to run files with root permissions. Is ...
1
vote
1answer
359 views

No exec permissions on programs in /usr/local/bin

I have installed the newest Erlang from source. As the final step I have executed sudo make install Among other things, it placed erl link in /usr/local/bin, but its permissions are insufficient ...
1
vote
1answer
2k views

“No such file or directory” lies on Optware installed binaries

I've been using Optware to install packages on my ARM-based NAS for a while - the usual stuff like Transmission, Samba and others. However, I'd been having problems with Transmission hanging not long ...
11
votes
4answers
4k views

Binary compatibility between Mac OS X and Linux

Brace yourselves, this question will likely appear naive and/or foolish, seeing as I am relatively new to the inner workings of unix like systems, and programming in general. Ready? Ok! I will go ...
6
votes
1answer
442 views

Why do some symbolic links affect program behavior?

One thing that has been puzzling me for some time is this: % which halt /sbin/halt % file /sbin/halt /sbin/halt: symbolic link to `reboot' However, executing sudo halt does, of course, not reboot ...
3
votes
1answer
623 views

More doubts in bzImage

The description of the bzImage in Wikipedia is really confusing me. The above picture is from Wikipedia, but the line next to it is: The bzImage file is in a specific format: It contains ...
68
votes
2answers
14k 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 ...
5
votes
2answers
1k views

Find command: Searching for executable files

What type of parameter/flag can I use with the unix find command so that I search executables? (if this question is better suited for another stackexchange forum, I welcome you telling me so) p.s. ...
23
votes
4answers
15k views

Why do we use “./” to execute a file?

Why do we use ./filename to execute a file in linux? Why not just enter it like other commands gcc, ls etc...
25
votes
7answers
25k views

What is /usr/local/bin? Came across it in an script installation for Applescript but would like to know more

Before today, I've used Terminal to a limited extent of moving in and out of directories, changing the dates of files using the touch command, but had realised the full extent of Terminal after ...