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

1
vote
2answers
149 views

Running 64bit OS , Find all 32bit programs on a system

How should I locate all 32bit programs on my system ? I'm running a 64bit OS. (There might be some , but I forget)
1
vote
1answer
243 views

Using emacsclient with custom emacs in $PATH

I want to use emacs command as a substitution for emacsclient -c -a "", which according to man connects to an existing emacs daemon, or creates a new daemon and connects to it otherwise. So i created ...
2
votes
3answers
5k 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
2answers
621 views

vim: create file with +x bit

Is there any way to set +x bit on script while creating? For example I run: vim -some_option_to_make_file_executable script.sh and after saving I can run file without any additional movings. ps. ...
1
vote
1answer
595 views

ld-uClibc.so missing

I am trying to run an executable on Angstrom Linux, but ash tells me -sh: ./myEx: not found I've checked with readelf the program interpreter and it is root@beagleboard:~# readelf -l myEx | grep ...
2
votes
1answer
680 views

using Set uid to run a root command from non-root user

Consider the following two files. summarize's executable UID bit has been set, so that another user belonging to another group can execute the summarize executable that uses the customers.dat file. ...
3
votes
1answer
123 views

What does CONFIG_IA32_AOUT do actually?

I'm running a 64bit kernel, already have CONFIG_IA32_EMULATION set, so do I still need CONFIG_IA32_AOUT enabled? From the help in menuconfig, I don't quite get it.
1
vote
3answers
1k views

How do I run a windows executable in linux shell script?

I have an executable program (no source code, just the compiled executable) that was made in windows (.exe extension). It doesn't use any graphics... it simply reads and writes files. I want to be ...
2
votes
1answer
317 views

Why do Unix-like systems execute a new process when calling a new function?

Why do Unix-like systems execute a new process when calling a function rather than a dynamic library? Creating a new process is costly in terms of performance when compared to calling a dynamic ...
3
votes
2answers
203 views

Finding program name by wildcard pattern

I am trying to write a script that will attempt to find if a certain program is installed. Lets say that the program is called, myprog. The problem is that the program can be named in different ...
8
votes
1answer
3k views

Where should a local executable be placed?

I have an executable for the perforce version control client (p4). I can't place it in /opt/local because I don't have root privileges. Is there a standard location where it needs to be placed under ...
2
votes
1answer
2k views

Generating a Linux executable with Mono with mkbundle

A C# file in mono can be compiled using gmcs command. This will create a hello.exe file. $ gmcs hello.cs $ ls hello.cs hello.exe $ ./hello.exe Hello from Mono! To generate a linux executable, I ...
4
votes
3answers
687 views

Most unix-like filesystem that can be mounted under windows and Mac OS X

I've recently purchased a usb stick which I will be using to share data between me and my colleagues. I'd like to format it as ext3, but I know this will cause trouble because for instance Mac OS X ...
5
votes
1answer
562 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 ...
22
votes
6answers
9k views

Can a script be executable but not readable?

Is it possible to execute a script if there is no permission to read it? In root mode, I made a script and I want the other user to execute this script but not read it. I did chmod to forbid read and ...
5
votes
2answers
312 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.: ...
3
votes
3answers
516 views

Join the executable and all its libraries

Lets say I have a /bin/cat executable that uses the following shared libraries: linux-vdso.so.1 libc.so.6 /lib64/ld-linux-x86-64.so.2 Is it possible to somehow "join" that stuff together ...
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 ...
2
votes
1answer
863 views

skype not found on Oneiric 64, but it is right there [duplicate]

Possible Duplicate: Can't execute some binaries in chroot environment (zsh: Not found) I have something weird here. Cannot find a file although it is right there. $ skype command not ...
2
votes
1answer
2k views

Creating symbolic links to applications in Mac OS X

I installed Aquamacs in a fresh OS X desktop, and wanted to be able to call the program from the commandline. Calling the file inside the app seems to work just fine: Amoss-iMac:bin amosjyng$ ...
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
1k 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 ...
3
votes
1answer
2k 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
111 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 ...
7
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
8k 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
249 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
5k 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 ...
13
votes
5answers
10k 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
654 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
265 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
219 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
1k 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 ...
6
votes
3answers
7k 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
555 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
839 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
1k 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
453 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
219 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
138 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
367 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
4k 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
250 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
292 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 ...