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
51 views

Installing a bz2 file

Coming from a windows platform I am a bit confused over how compressed files are installed in Linux . I am using fedora 20. Now I downloaded FoxIt pdf reader from here. I also read this post which ...
0
votes
4answers
51 views

how to execute a bash script without typing ./ [duplicate]

It has been bugging me for a very long time and I'm really sick of it. For example there's a script called testscript that compares two directories. In class the prof can just type testscript dir1 ...
0
votes
1answer
23 views

What is the difference between the built in echo command and /bin/echo? [duplicate]

I was playing around with the type and which commands and I discovered something strange. type either returns the path or says that a command is a Bash built in. which either returns the path or ...
6
votes
1answer
256 views

Portability of an executable to another Linux machine

I've installed the program Motion on one Linux machine (M1) and want the same program on another (M2). There are various builds of this program, and I have forgotten which one I have used, so can I ...
2
votes
1answer
52 views

can't execute a command even i'm in the group and command is -rwx--x---

I'm in $ORACLE_HOME/OPatch directory and when I type opatch then I get the response as, -bash: opatch: command not found If I do ./opatch, then I get the response as, /bin/sh: ./opatch: ...
1
vote
2answers
35 views

Why the S_ISUID and S_ISGID mode bits got cleared when the owner or group of an executable file are changed by an unprivileged user

I was reading the man page of chown. I don't understand why S_ISUID and S_ISGID mode should be cleared when the function returns successfully.
0
votes
1answer
29 views

Find file names for executables, which are not used by other projects already

A new program which should be deployed as package for the major distributions should avoid name clashes. ls /usr/bin can show me that tail is a bad choice for a new binary file name. But how can I ...
0
votes
1answer
23 views

Installing Xcape (a newbie question involving the “make” command)

I executed the minimal building directions of xcape: $ sudo apt-get install git gcc make pkg-config libx11-dev libxtst-dev libxi-dev $ mkdir xcape $ cd xcape $ git clone ...
10
votes
2answers
819 views

Run a binary owned by root without sudo

I had a question on a job interview: How can you execute (run) the program with the user user1 without sudo privilegies and without access to the root account: $ whoami # user1 $ ls -l ...
0
votes
0answers
47 views

Permission Denied on an Executable File

I am newbie to linux so any help would be greatly appreciated - I tried searching and am having trouble finding an answer. Downloaded a compiled executable file (source written in c) in ubuntu I ...
0
votes
1answer
19 views

Directories showing up in green(executable) even after removing execute permission for all. (Ubuntu 12.04) [duplicate]

I just copied a directory from a USB flash drive. I copied it from an NTFS drive and so all the files had execute permission. I executed chmod -x * to undo the execute permission. Despite that, all ...
4
votes
1answer
34 views

Preserve evidence of intrusion / deleted executable?

If you are faced with a non-root remote command execution vulnerability, and there is a foreign executable that's running on your Linux system from a user with only non-administrator privileges, ...
2
votes
1answer
229 views

How does bash execute an ELF file?

When I'm on my Linux Box I use bash as a shell. Now I wondered how bash handles the execution of an ELF file, that is when I type ./program and program is an ELF file. I grepped the bash-4.3.tar.gz, ...
2
votes
1answer
446 views

Running sh script: «Permission denied» despite the executable bit and root rights

I installed Debian in VirtualBox (for various experiments which usually broke my system) and tried to launch the VirtualBox guest addon script. I logged in as root and tried to launch autorun.sh, but ...
0
votes
2answers
125 views

Why setuid does not work on executable?

I know that enabling setuid on scripts has security issues and so is inactive by default, but expect that it works for executables. I created and executable which shows uid as an output following ...
2
votes
4answers
161 views

Execute all files in a list

I have a source tree which, when make is run, produces several executables named "001", "002", and etc. I'm trying to write a script which will find all of these executables in my source tree, and ...
0
votes
1answer
671 views

ant command not found when running from the path othe than ant installation directory

Actually I have installed Ant in rhel5 environment and set ANT_HOME variable in /etc/profile which points to /usr/local/ant/bin so when I execute command echo $ANT_HOME it gives correct path but I get ...
2
votes
0answers
22 views

Executable exists for everything but bash & file manager [duplicate]

I am running Debian. I was trying to use truecrypt the other day. I downloaded and extracted the zip, and ran the installer. I just extracted the file, and did not install it. I then tried executing ...
6
votes
1answer
2k views

sudo: unable to execute ./script.sh: no such file or directory

I'm stumped. I have a script in my /home directory which is executable: [user@server ~]$ ll total 4 -rwx------ 1 user user 2608 Jul 15 18:23 qa.sh However, when I attempt to run it with sudo it ...
2
votes
3answers
336 views

Shell script not executing

Not sure what is happening. Lets call script a.sh with the following /users/guru$ cat a.sh #! /usr/bin/ksh echo "Hello" date Execute with ksh. It gets done. /users/guru$ ksh a.sh Hello Tue Jul ...
2
votes
1answer
490 views

Bash Script Permission denied & Bad Interpreter

I'm on a kali linux 64 bit. I have created a python script which takes 2 arguments to start. I don't want to type out every time the exact same paths or search in the history of the commands I used ...
4
votes
2answers
61 views

Find out extension of executable files?

When I am building software from source on a GNU+Linux system, during the ./configure stage I frequently see the following line: checking for suffix of executables... How do I create such a check ...
0
votes
2answers
64 views

Why do I have to execute bash programs with ./? [duplicate]

Why is it that some bash programs will only run on my system when I type ./ before their name? An example: In my [...]/android/sdk folders I have to execute adb like this: ./adb devices Why not ...
4
votes
1answer
134 views

Default to “Execute” when double-clicking on a shell script in PCManFM

Is it possible to get an executable to execute by default? What I mean is this. I have an .sh file, which if I click on twice, it will show me this: If I then click Execute, it does the right ...
2
votes
3answers
234 views

How is it possible to do a live update while a program is running?

I wonder how killer applications such as Thunderbird or Firefox can be updated via the system's package manager while they are still running. What happens with the old code while they are being ...
6
votes
2answers
236 views

Why there are multiple folders for executable files in Linux? [duplicate]

I'm trying to understand Linux file system, and one of the question is: 1- Why there are multiple folders for executable files: /usr/bin, /usr/sbin/ and /usr/local/bin? Is there any differences ...
2
votes
3answers
530 views

Run script without ./ before the name

I am running a quite complicated script which changes directories and runs many other commands. All these commands are run using 'scriptname', which works fine when I execute the main script from my ...
19
votes
2answers
3k views

What is the difference between running “bash script.sh” and “./script.sh”?

If script.sh is just something typical like #!/bin/bash echo "Hello World!" Is there a preferred way to run the script? I think you first have to chmod it so it becomes executable?
1
vote
1answer
2k views

-ksh: revenue_ext.ksh: not found [No such file or directory]

I am getting the same not found [No such file or directory] error when trying to execute a ksh script. Read tips about the PATH and running the script with a ./ in the posts here and here and tried ...
1
vote
2answers
76 views

How many sections can I create in object file?

I'm following the course of Baking Pi – Operating Systems Development. In it they created another section .init. So can we create as many sections as we want (not just .data, .bss, .text) and can we ...
0
votes
0answers
10 views

make: arm-elf-gcc: Command not found [duplicate]

I'm working on an application for a Moxa UC-7110, and I have installed their tool chain, which provides a cross compiler for their arm architecture on uClinux. I'm on on Ubuntu 12.04 LTS. I'm having ...
5
votes
1answer
218 views

How do I view executables run by a program?

Is there a way to view or get a list of executables that a program uses? A particular example is file-roller. Is there a way to see which executables it uses, if there is more than one executable it ...
3
votes
0answers
133 views

Shebang: History and Purpose

I have few questions about the magic number #!, the shebang. I read that it was introduced by Dennis Ritchie in the 70s as a way to see a script as an executable file. I don't understand, why it was ...
0
votes
2answers
44 views

Compiling for Red Hat 5.9

I need to compile a C++ application to run on Red Hat 5.9, but I don't have access to a development server that runs Red Hat 5.9. My current executable compiled on Ubuntu 10.04 produces the error ...
1
vote
1answer
126 views

can't get hello world shell script to run in FreeBSD

Server is running FreeBSD 9.2. Using vim, I wrote the following script called hello: #!/bin/sh echo "hello world" Then I set it as executable: >chmod 755 hello Then I tried to run it from ...
1
vote
2answers
8k views

chroot: failed to run command ‘/bin/bash’: No such file or directory [duplicate]

When I run the chroot command an error is given: failed to run command ‘/bin/bash’: No such file or directory
2
votes
1answer
147 views

A file exists but executing it doesn't work

I downloaded a Java tarball, extracted the archive and copied over scp to a remote machine. Using the ls command, the java executable exists: ubuntu@Ubuntu:~$ ls -la /home/ubuntu/jre1.7.0_55/bin/ ...
1
vote
1answer
49 views

How to compile to a specific executable format?

I'm a bit confused. I just read this: http://www.es.freebsd.org/doc/handbook/binary-formats.html, which basically says that freeBSD uses the elf binary format. But when I compile my code I using cc, I ...
0
votes
1answer
66 views

Create a package for debian that contain other program/deb package

I need some direction about this matter. I need to create a package or an executable program that will install some other deb package like tightvnc... So basically when I user execute my package, ...
0
votes
1answer
69 views

Trouble creating symbolic link [closed]

I installed a software on OpenSUSE. However, to open it one has to type /usr/local/software/start_software everytime. I tried creating a symbolic link using sudo ln -s ...
0
votes
1answer
773 views

Can't run executable file on Ubuntu, terminal expects sudo, or gives errors like “Invalid or incomplete multibyte or wide character”

I'm trying to run executable files on Ubuntu, but it's not working, although the exact same executable file works fine on others' machines, which are also running Ubuntu 12.04 like me. Based on this, ...
8
votes
3answers
271 views

where to put binaries so they are always in path and can be found easily

I am making quite some binaries, scripts etc that I want to install easily (using my own rpms). Since I want them accessible for everyone, my intuition would be to put them in /usr/bin; no need to ...
1
vote
1answer
110 views

List files, directories and executables in current directory

I have php shell and I have function that do just that (but it give me error when I call scandir($path) function because of restriction in php), so I need to use my bash shell to do the same. It can ...
1
vote
5answers
148 views

override hardcoded paths in executables

I'd like to override some hardcoded paths stored in pre-compiled executables like "/usr/share/nmap/" and redirect them to another dir. My ideal solution should not require root priviledges, so ...
4
votes
6answers
315 views

List all binaries from $PATH

Is there one-liner that will list all executables from $PATH in bash.
2
votes
3answers
360 views

How to recover from recursive 'chmod -x' on my home folder

I pressed ENTER after typing the following stupid command on my home directory: find . -type f -exec chmod -x '{}' ';' What do you advise as a fix for this. My guess is that I can't do anything but ...
1
vote
1answer
185 views

How to find out the dynamic libraries executables loads when run

I want to find out the list of dynamic libraries a binary loads when run (With their full paths). I am using CentOS 6.0. How to do this?
15
votes
1answer
494 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: ...
5
votes
3answers
449 views

Why does this executable still execute after I deleted it?

I deleted the executable, so why is it still running? root@raspberrypi:/test# ls -la total 11096 drwxrwxrwx 2 pi pi 4096 Mar 12 18:26 . drwxrwxr-x 11 pi pi 4096 Feb 28 13:50 .. -rwxrw-rw- 1 ...
14
votes
2answers
2k views

How are system commands like ls created?

I'm a *nux newbie and I have some doubts regarding *nix. I don't know which type of executable file is ls, whether it is .sh or .ksh or any other kind of system executable if it is, what is that? ...