Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [executable]

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.

1
vote
1answer
35 views

Desktop Entry Requires “bash” in Exec Value

I recently began messing with Desktop Entries in order to run some scripts at Gnome startup. I've read through some freedesktop documentation, as well as this post on creating a startup script. I ...
0
votes
1answer
19 views

Stopped process reasons?

I'm running a program using a batch file and it keep giving me this ERROR: STOPPED PROCESS I've noticed that the program stops each time in a place a little after the place he stopped the last ...
0
votes
0answers
6 views

Can run the command when specify the path, but cannot run it by name although PATH points to it [duplicate]

I have the following setup: $ which pip3.7 /py36env/bin/pip3.7 $ sudo pip3.7 list sudo: pip3.7: command not found $ sudo /py36env/bin/pip3.7 list Package Version ------------------...
2
votes
0answers
68 views

Are .text sections shared between loaded ELF executables?

If one program, for example grep, is curretly running, and a user executes another instance, do the two instances share the read-only .text sections between them to save memory? Would the sharing of ...
1
vote
1answer
41 views

Linux's command line behaviour (Ubunto/Deb) in running an executable file [duplicate]

@user-123:~$ Downloads/execfile-3.4/execfile @user-123:~$ @user-123:~$ cd Downloads/execfileparentdir-3.4/ @user-123:~/Downloads/execfileparentdir-3.4$ execfile execfile: command not found @user-123:~...
0
votes
2answers
61 views

Why does libarchive's bsdtar's unzip throw away the permission bits when reading a ZIP-archive from stdin, but not directly?

I encountered that the command bsdtar from the package libarchive (under Arch Linux, at least) does throw away executable bits of files in .zip-archives when reading from stdin, but not when directly ...
0
votes
1answer
41 views

How to create wrapper script for python so that sys.executable becomes equal to name of this script?

I need to run Python interpreter with custom parameters and custom environment. Let's say I create a bash script which exports required variables and calls /usr/bin/python3 with required parameters. ...
0
votes
1answer
82 views

Is it possible to read a file you only have executable permissions to on Linux through Bash?

I was wondering if it was possible to somehow get the contents of a file which you do not have read access to. I first attempted trying to get around the permissions using the inode number of the file,...
1
vote
1answer
54 views

Running an executable without sudo

I have a small function in my .zshrc. It creates a command to search for and run an executable file, that may or may not exist, in the current directory, or a parent directory somewhere up the current ...
1
vote
1answer
69 views

Building shared library which is executable and linkable using Cmake

How to create an executable shared-library using cmake? Something like: libtest.so :: linkable shared library libtest.so :: executable too Note: gcc/g++ options are known to achieve the ...
0
votes
0answers
87 views

How to lauch an AppImage from the GUI?

After downloading an AppImage and giving it execute permissions, I can launch it from the command line only (Bash). When I double click on it with the mouse, another default application starts and ...
-2
votes
1answer
85 views

Space after filename (Linux) [closed]

Whats different "name.txt" vs "name.txt " in Linux? If I rename name.bin to name.txt - is normal and file doesn't executable. If I rename name.bin to file.txt (with space after filename) - file ...
0
votes
1answer
53 views

Lua standalone with external binary program

I am writing a small program to us in LuaLaTex. The purpose of it is to produce an qr-code with a given uuid, the qr-code is printed on the page and the uuid is stored in the pdf's meta-data. ...
4
votes
3answers
98 views

In what format does piped output get sent and received from one command/program to another? [duplicate]

When a command is piped to another command in what way or in what format does the piped output exist/get sent? Is it a temporary file? Is it a string? And how does the command that receives the piped ...
0
votes
1answer
34 views

Run combined hexo command from desktop entry

I have Debian 9.5 with xfce and hexo: 3.7.1 The question is about throttle my script called "draft": s@lokal:~$ sudo cat /usr/local/bin/draft #!/bin/bash killall hexo cd /home/s/Dropbox/blog hexo ...
0
votes
2answers
72 views

Where to store proprietary code and executable scripts? [closed]

I have Python code that is run using a bash script. I want non-sudo users to be able to run it without making the Python code readable. What is the recommended pattern? Two ways I considered: Put ...
1
vote
1answer
39 views

Is there a way to restore an uninstalled executable from bin?

I tried upgrading pip3 using su -c 'pip3 install' --upgrade pip' because I got errors and it failed when trying to upgrade it as a normal user. This removed the pre-installed pip from /usr/bin and ...
0
votes
1answer
98 views

Requirements to run LAXUNIX.SH - LaunchAnywhere (tm) version 14.0

I am trying to install a program. After installation was done, I tried to click on the installed file and I got this: LAXUNIX.SH - LaunchAnywhere (tm) version 14.0 To run this script you will need ...
1
vote
1answer
522 views

Make binary executable available for all user

How to make a binary file available for all linux(Ubuntu) user. eg: When we install the golang using apt install golang-go the go executable is available for all user. Where will they add the ...
2
votes
2answers
430 views

Is there a way to embed an executable binary in a shell script without extra tools?

I'm looking for a way to have an executable binary hardwired into a script. Something like this: #!/bin/bash ...some shell code execute binary: >>> binary code ......
0
votes
1answer
125 views

Why would README.md show up as an executable?

This is on a Mac but I figure it's a Unixy issue. I just forked a Github repo (this one) and cloned it to a USB stick (the one that came with the device for which the repo was made). Upon lsing I ...
0
votes
3answers
115 views

Check if a command is executable [duplicate]

How can you check if a command can be executable or not in Linux. Example: xeyes
1
vote
1answer
271 views

Why can't I find the symbol tables in the C libraries in MacOS?

I've looked at the hexdump of both libc.dylib and xlib.dylib, and I can't find the symbols for the C functions in those libraries within those files. I figure they should be in there, because I've ...
3
votes
2answers
255 views

Why /usr/bin/rename.ul has an extension?

I found a command rename.ul on my Ubuntu machine. It comes from util-linux package. It is odd for me because I rarely see executables with extension. In addition, it seems unnecessary because the ...
1
vote
1answer
60 views

Why do all standard commands include an ASCII letter?

Although one can easily make an executable file named ./42 or even ./カラオケ, I find no common packages that include letter-free commands. On Ubuntu, for example, apt-file find . | grep -i -e '/[^a-z/_\-...
0
votes
1answer
207 views

Run python script without declare it interpreter

I have such a program to check methods of data from the command line: me at me in ~/Desktop/Coding/codes $ cat check_methods.py #! /usr/bin/env python from sys import argv methods = dir(eval(argv[1]))...
0
votes
3answers
224 views

Using nohup and time with different outputs

I want to run an executable main and redirect all outputs to /dev/null, meanwhile I measure its runtime with time and write the results to runtime.out. Since the task is long I also have to run the ...
0
votes
3answers
89 views

Different Linux distros sharing applications

Multiple Linux distros can be installed on the same machine. The format of executables should be the same for every one of them. So I want to use multiple distros on a single machine and have access ...
9
votes
4answers
3k views

Which user's password does `sudo` asks for?

$ ls -l /usr/bin/sudo -rwsr-xr-x 1 root root 136808 Jul 4 2017 /usr/bin/sudo so sudo is runnable by any user, and any user who runs sudo will have root as the effective user ID of the process ...
-2
votes
1answer
69 views

Is it ever meaningful that the owner of an executable file doesn't have the execution permission?

Assume an executable file has its set-user-id bit on. When a process executes the executable file, it changes its effective user ID to the owner user ID of the executable file, after the kernel ...
3
votes
1answer
561 views

Running python script on ubuntu machine using ./myscript.py

I am running a python script named myscript.py on ubuntu machine. I usually use python command to run python scripts as below. python main.py Recently, I downloaded a python script from a Github ...
0
votes
1answer
49 views

Does execution of a file need read permission?

Does execution of a file need read permission? It is natural to think yes, because execution of a file needs to load the file into memory. If the answer is no, why is that? In particular, same ...
0
votes
0answers
337 views

What is the usage of set-user-ID of a program file?

From APUE When we execute a program file, the effective user ID of the process is usually the real user ID. However, we can also set the set-user-ID bit in the file’s mode word (st_mode) that ...
2
votes
1answer
141 views

What kinds of executable formats do the files under /proc/sys/fs/binfmt_misc/ allow?

I following Michael's reply to see what executable formats my Ubuntu can recognize to execute $ ls -l /proc/sys/fs/binfmt_misc/ total 0 -rw-r--r-- 1 root root 0 Apr 19 16:11 cli -rw-r--r-- 1 root ...
1
vote
1answer
41 views

Run portable LaTeX on Gentoo

I'm trying to get a portable LaTeX installation running on a Gentoo Server. The LaTeX files are already installed. When I try to run ./pdflatex in the path/to/texlive/bin/x86_64-linux/ I get the ...
112
votes
9answers
19k views

Why is /dev/null a file? Why isn't its function implemented as a simple program?

I am trying to understanding the concept of special files on Linux. However, having a special file in /dev seems plain silly when its function could be implemented by a handful of lines in C to my ...
0
votes
1answer
79 views

binary placed in folder on $PATH is not immediately accessible

in my $PATH I have folder ~/.zsh/bin which I use for small scripts and custom built executable binaries, for example I added a recently compiled tool I made called wercker_build_status to the folder. ...
-1
votes
1answer
42 views

Design rationale behind search bit for directories [duplicate]

Execute permission can be reasoned as a special program access control mechanism. The search permission on the other hand is described like this in the POSIX specification for an error code for open ...
0
votes
0answers
34 views

How can I make a progress bar for a shell script calling an executable? [duplicate]

I don't want to make a progress bar for the script itself, but rather the duration of the executable that it calls. So for instance, #!/bin/sh echo "some stuff" <do some stuff> echo "some ...
0
votes
0answers
343 views

Using WINE to install and use iTunes on Elementary OS Loki

I have downloaded Wine and configured wine to Windows version to Windows 7 since that is the lowest version of Windows iTunes works on. I can’t even get the itunes.exe file (downloaded from the ...
0
votes
1answer
409 views

How to list all commands available from $PATH [duplicate]

I would like to list all commands available in $PATH. Any idea ?
3
votes
2answers
532 views

setgid: chmod g+s,g-x on executable

I'm not understanding setgid on executables on my platform (ubuntu). g-x,g+s is not giving the process effective group permissions of the program's owner. $ gcc perms.c -o perms; ls -l ; ./perms -...
0
votes
0answers
39 views

Variable expansion succeeds with echo but fails without a command (execution by expansion) [duplicate]

I created a file nano ~/uncwe/configurations/variables.sh. This file contains: set -a rse="~/${repo}/internal_software/rse.sh" set +a I sourced the file, then tried to execute: ${rse} bash ${rse} ...
3
votes
5answers
163 views

How to execute many files in the same directory in a minimal, DRY, pretty way?

I use Ubuntu 16.04 and I have a localization file, a file that executes many files, that I got after downloading my own GitHub project to my machine. This file contains a Bash script, and is named ...
0
votes
1answer
49 views

Set two or more files for execution (via source) in a comfortable way to read

I used the following way to execute a collection of Bash script files, in the current Bash session: source ~/myScripts/{assignments.sh,nginx_conf.sh,php_conf.sh,drush_install.sh} It feels to me ...
3
votes
2answers
818 views

How does bash execute commands

This is more of a general question I have been curious about but put simply: how does bash execute commands given to it via a script or terminal? It would be possible, I guess, to have a bunch of if ...
32
votes
4answers
8k views

What is the min and max values of exit codes in Linux?

What is the min and max values of the following exit codes in Linux: The exit code returned from a binary executable (for example: a C program). The exit code returned from a bash script (when ...
2
votes
1answer
211 views

Recovering from removing execute permission from ld-linux.so

After reading about removing the execute permission from chmod, I got curious. Is it possible to recover from removing the execute permission from ld-linux.so without rebooting if I haven't yet exited ...
-1
votes
1answer
6k views

Running executable file: No such file or directory [closed]

I am trying to run an executable file called i686-elf-gcc in my Kali Linux that I downloaded from this repository. It's a cross-compiler. The problem is that even though the terminal and a script that ...
2
votes
1answer
4k views

Cannot run .exe files

Normally my Linux OS allows me to create runnable executables (like a.out), but when I attempt to download an .exe from the Internet, it basically is permission restricted (neither user has execution (...