Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
1answer
29 views

Running an executable off of a usb drive

I have an executable on my usb drive. I cd to the directory, ./app yields permission denied. So I did chmod u+x app. Then, ./app. But still, permission denied.! Then I read something here: That ...
0
votes
1answer
16 views

How to give permissions for all users to execute a program installed by sudoers?

I installed a Perl program with many external dependencies in /opt/Soft (ubuntu 18 ) using sudo su at first step. Once installed, I exit the "sudo su" mode I could not anymore execute the program as a ...
1
vote
1answer
54 views

Binary executable file with write permission get READONLY from vim

First I know that use vim to write a binary executable program is not recommended. So, I don't want to talk about its rationality here. I have a binary program, with permission 755(owner is root), so ...
0
votes
0answers
24 views

Linux - Upgrading the BIOS using an EXE

When a bios update is only available via .exe, what's the easiest way to update the bios on a computer running Linux exclusively? Many times I've had to install Windows 10 onto a computer just long ...
0
votes
1answer
57 views

What types of executable files exist on Linux?

For example, if I do [OP@localhost executable]$ cat garbage lalala trololol [OP@localhost executable]$ chmod +x garbage [OP@localhost executable]$ ./garbage ./garbage: line 1: lalala: command not ...
12
votes
1answer
1k views

Executable file named 'test' is in $PATH but won't run

I have a file in $HOME/bin (before you ask, yes, it is in my path) called test which I've confirmed can be executed fine when I run it with the full path to the file. However, I get a really weird ...
1
vote
0answers
32 views

Make programs in /opt searchable from launcher

I've installed Telegram and I've the folder "tsetup.1.3.10", where executable files reside, into Download folder. I don't want my programs in Download folder, so I moved they in /opt folder. But, ...
0
votes
0answers
156 views

lmgrd: No such file or directory

While there are comparable questions out there, I have not found a solution for this specific circumstance. And I admit that this particular question may be appropriate to only me; however, the ...
14
votes
8answers
3k views

Linux shell script: Run a program only if it exists, ignore it if it does not exist

I am programming a Linux shell script that will print status banners during its execution only if the proper tool, say figlet, is installed (this is: reachable on system path). Example: #!/usr/bin/...
1
vote
1answer
72 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
36 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
16 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
97 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
42 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
128 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
196 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
224 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
80 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
670 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 ...
-2
votes
1answer
126 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
113 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
103 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
35 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
75 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
146 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
959 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 ...
3
votes
2answers
777 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
197 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
3k views

Check if a command is executable [duplicate]

How can you check if a command can be executable or not in Linux. Example: xeyes
2
votes
1answer
533 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
421 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
61 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
248 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
379 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
4answers
121 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 ...
8
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
81 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
756 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
52 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
478 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
251 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
53 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 ...
114
votes
9answers
20k 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
119 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
46 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
44 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
1answer
566 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
757 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
40 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} ...