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

21
votes
2answers
8k 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 ...
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 ...
21
votes
4answers
8k 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...
19
votes
8answers
12k views

Different ways to execute a shell script

There a several ways to execute a script, the ones I know are: /path/to/script # using the path (absolute or relative) . script # using the . (dot) source script # using the `source` command ...
5
votes
1answer
1k 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 ...
8
votes
1answer
804 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? ...
0
votes
1answer
837 views

/bin/sh: ./check-dependencies.pl: not found — but check-dependencies.pl exists!

I'm trying to build Moses, but when I run make I get the following output: minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release # Compile the parts make all make[1]: ...
15
votes
1answer
256 views

How to trick a particular command into thinking it is a different date?

How can I execute a command making it believe that is on a different date than system one? For instance, if I have this script: #!/usr/bin/env bash date +"%B %d, %Y" It prints the actual date: ...
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 ...
12
votes
1answer
803 views

What is Linux doing differently that allows me to remove/replace files where Windows would complain the file is currently in use?

The example I have is Minecraft. When running Bukkit on Linux I can remove or update the .jar files in the /plugins folder and simply run the 'reload' command. In Windows, I have to take the whole ...
9
votes
1answer
4k views

how to convert a shell script into binary executable?

I want to convert my shell scripts into binary executable so that nobody else could edit or read it.Is there any way to convert it into binary executable?
27
votes
4answers
963 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 ...
16
votes
3answers
1k views

Does the shebang determine the shell which runs the script?

This may be a silly question, but I ask it still. If I have declared a shebang #!/bin/bash in the beginning of my_shell_script.sh, so do I always have to invoke this script using bash ...
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?
4
votes
3answers
528 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 ...
2
votes
2answers
2k views

can't change file permission

Whenever I create or copy few shell files to usb storage device, then I am not able to make them executable. If I create test.sh, it's default file permission will be 644, but when I execute ...
92
votes
6answers
5k views

How to chmod without /usr/bin/chmod?

Today I was told a tale by a Unix trainer, a tale where the root password got leaked to the students, and one of the fellas removed the execute permission from /usr/bin/chmod itself. How do you ...
19
votes
4answers
5k views

What makes OSX programs not runnable on Linux?

I know there are many differences between OSX and Linux, but what makes them so totally different, that makes them fundamentally incompatible?
4
votes
1answer
86 views

What does `init [2]` mean in the COMMAND column of ps?

Reading What do the brackets around processes mean? I understand that the executable name is printed. Linux ps man page: Sometimes the process args will be unavailable; when this happens, ps will ...
10
votes
2answers
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 ...
5
votes
3answers
2k 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 ...
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 ...
3
votes
3answers
3k 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 ...
4
votes
3answers
258 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 ...
3
votes
4answers
743 views

Running python script from Linux Terminal

I have downloaded this script named, pyAES.py and put it in a folder name codes, inside a Desktop directory of my Linux, According to this example, ...
3
votes
1answer
2k views

“No such file or directory” on an executable, yet file exists and ldd reports all libraries present

ldd xls linux-gate.so.1 => (0xb77bc000) libQtGui.so.4 => /usr/lib/i386-linux-gnu/libQtGui.so.4 (0xb6cc2000) libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb6c98000) ...
2
votes
1answer
750 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 ...
1
vote
1answer
369 views

“No such file or directory” when executing a cross-compiled program on a Raspberry Pi

I recently bought a Raspberry Pi. I already have configured it, and I install a cross compiler for arm on my desktop (amd64). I compiled a simple "hello world" program and then I copy it from my ...
0
votes
2answers
87 views

are daemon tmpfs executables copied unencrypted to memory upon execution? (prevent if so?)

When a daemon is executed, is the executable copied to memory? If so, can it be copied encrypted? If not, is there a way to prevent the executable from being copied to memory? The executable is ...