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
0answers
24 views
Opening an executable via GUI does nothing although opening it via terminal works
I have made a small Snake game using C. But as the title says, when I open it via GUI (Nemo), nothing gets opened. But if I open it using the terminal, it works as expected. I've tried it on multiple ...
1
vote
2answers
65 views
Linux `size` command gives different results from `ls`
I have an executable i build on Ubuntu 16.04. The file size shown on the GUI and through the ls -l command is:
-rwxrwxr-x 1 alibivmuser alibivmuser 19108760 dic 20 15:49 NreSpeechApplication
And I ...
1
vote
1answer
41 views
“No such file or directory” as error for wrong architecture [duplicate]
I'm trying to run a cross compiler on my 64 bit Ubuntu. and it results in a following error:
$ ./arm-none-eabi-gcc
bash: ./arm-none-eabi-gcc: No such file or directory
The file is here and contains ...
0
votes
1answer
54 views
Running a program that's been compiled with gcc
When I compile a C program with gcc I get the file a.exe; however, to run this I have to type in the command ./a.exe. I believe it is possible to edit the .bashrc or .bash_profile so that I only need ...
0
votes
2answers
14 views
What's the difference between sudo find /usr -perm /a=x and sudo find /usr -executable
They should both get the files that are executable but I get different numbers
[user@j6727961 ~]$ sudo find /usr -perm /a=x | nl
1 /usr
2 /usr/bin
3 /usr/bin/nroff
4 /usr/bin/...
1
vote
2answers
29 views
Various shells won't run a binary that exists
I downloaded several pre-built binaries of the same program (nodejs-linux, -x86, -x86_64). In different shells I get a similar error that no such file or directory: node. The $PATH is correct and the ...
2
votes
1answer
45 views
If a user can only read and write files, is that sufficient to prevent execution?
A user has use of an application running on a Linux server. The application provides the user with an API that allows reading and writing files on the server, but does not offer any means of ...
0
votes
1answer
23 views
Set a program or bash as default program for *.rdp files
I have a xfreerdp connection file like:
xfreerdp /v:10.1.60.151 -sec-nla /cert-ignore
The file name is test.rdp and I can run it with the command bash test.rdp
But I need to run this file from GUI ...
0
votes
1answer
26 views
What could have caused g++ (and clang++) executables to stop working? [closed]
I can't understand what's going on. Yesterday everything was working normally. Literally all I did since then was clearing the bash history with history -cw. Today all I get when trying to execute my ...
1
vote
2answers
42 views
Absolute path to currently executing program
argv[0] references the shell command that caused the current process to load. getcwd() returns current working directory. From that info, can I construct an absolute path to the program's binary ...
3
votes
2answers
113 views
Best way to create “interruptable” executable
The job of my Unix executable file is to perform a long computation, and
I added a interrupt/resume functionality to it as explained below.
At regular intervals, the program writes all relevant data ...
0
votes
1answer
19 views
Crontab order run with differents schedule
I have a crontab with different time to execute some task, for example every minute, every 10 min, 1 hour, daily...
And i have a question, when some of this cron coincide in the same time for example,...
1
vote
2answers
66 views
What user does a Linux script/app run as?
CentOS here, but I don't think that matters because this should be a core Linux question (methinks). While trying to install & run Apache Kafka (a Java executable) on a CentOS box, I thought of a ...
-2
votes
1answer
101 views
Unix Executable File To Text File [duplicate]
Is there a way to change a text file to a unix executable file without terminal? I'm using a school laptop that is a MAC and it doesn't allow me to use terminal. Im trying to change a text file or a ....
3
votes
1answer
91 views
Mark binaries writable and executable in openBSD
As of OpenBSD 6.0 mandatory W^X enforcement is implemented.
Binaries that need permission to violate this rule can be marked with the ld command:
Identify W^X labelled binaries at execve(2) time ...
-2
votes
1answer
66 views
Why does Unix set the executable flag for FAT file systems? [closed]
This question has nagged at me for years. Why do it? There's almost no chance that you can or want to directly execute any program found on a FAT file system, and having the executable bit implicitly ...
2
votes
1answer
56 views
Execution of a program called by a shell called by crontab returns code 127
I'm stuck with the following (simple) problem :
I want a script to be executed every 10 minutes. This script calls executable files. I use crontab and ksh on a AIX 5.3 system.
The script makes use of ...
2
votes
2answers
128 views
Monitoring what program calls an executable file
I want to know what program calls a particular executable, including when that executable is used as an interpreter via a shebang line.
This is not quite the same problem as knowing what program ...
1
vote
1answer
22 views
Installed “singular” and can't start it
I downloaded Singular, from the terminal. I simply can't find it now that it's installed! It's not in my installed applications and the command "singular" on the terminal gives nothing.
How do I ...
1
vote
1answer
64 views
suid bit in SuSE has no effect through system() [duplicate]
Suid bit works fine on my PC running Ubuntu, but not on a SLES test instance.
The nosuid flag is not set on the mounted xfs file system on the SLES machine. ls shows that ony my machine and the SLE ...
0
votes
3answers
87 views
How to display all the unix commands available on the system?
I'm reading a book, Learning Unix for OS X by Dave Taylor. It says:
To quickly see all of the binary executables—Unix programs—on your
system,
Open the Terminal, hold down the Shift key, ...
2
votes
1answer
507 views
bash: ./idaq: No such file or directory
$ uname -a
Linux kali 4.3.0-kali1-amd64 #1 SMP Debian 4.3.3-5kali4 (2016-01-13) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux ...
1
vote
0answers
34 views
Calling Java programs without the .class suffix
This is a sequel to my other question, Getting Java programs start without calling with Java. I can already start Java programs from the terminal by just setting them executable and calling the X....
3
votes
2answers
253 views
Getting Java programs start without calling with Java
It would be handy to be able to start Java programs by just calling the class file from the terminal (and have it running it the terminal when double-clicked in GUI, but this is less important). I so ...
1
vote
0answers
36 views
How can I ship an executable file?
I have a project that is hosted on GitHub. On my local machine I have created an executable file that installs the program. However, once uploaded to GitHub and cloned somewhere else the user must ...
7
votes
5answers
2k views
How to recursively remove execute permissions from files without touching folders?
I made a backup to an NTFS drive, and well, this backup really proved necessary. However, the NTFS drive messed up permissions. I'd like to restore them to normal w/o manually fixing each and every ...
4
votes
1answer
126 views
How can I recover from a `chmod -x chmod`? [duplicate]
Assuming that you can't reach the internet nor reboot the machine, how can I recover from
chmod -x chmod
?
0
votes
1answer
41 views
How to locate exactly that executable, which will be run if it's name entered in command line? [duplicate]
Is it possible to locate exactly that executable
myname
which will be run if passed to command line
> myname
locate command didn't work as expected, since it returns numerous results. Result ...
0
votes
2answers
79 views
*nix executable compatibility
I looked at this scheme and now i want to know, can one executable be runned in a two systems, which have the same ancestor? (and so probably the same kernel?)
For example, according to the scheme: ...
46
votes
8answers
4k views
Why does Bash's source not need the execution bit?
with Bash's source it is possible to execute a script without execution bit set. This is documented and expected behavoir, but isn't this against the use of an execution bit?
I know, that source ...
32
votes
2answers
2k views
Difference between “command not found” and “no such file or directory”?
For example:
$ node
-bash: /usr/local/bin/node: No such file or directory
$ foo
-bash: foo: command not found
What's the difference? In both cases, node and foo are invalid commands, but it seems ...
3
votes
1answer
46 views
How to receive input from 2 files on an executable
Basically, I want to receive input from 2 different files whem I'm calling an executable on terminal
Like:
./a.out < file1.pgm file2.pgm
I want to read both the files input on my code, one after ...
2
votes
2answers
80 views
Is there a way to route all commands through a shell script instead of running directly?
Sorry about the title, I can't explain it very well without an example. I want to be able to have everything being executed, rather than running the program, runs a shell script with the executable as ...
1
vote
1answer
99 views
Combining Bash Script and Script Resources into One Executable
When trying to execute a bash script, it is often execute inside some directory, and requires access to local resources. I was wondering if there was a way to combine both the bash script and the ...
4
votes
1answer
335 views
Why can't I execute Android x86 executables on Linux
I am trying to port Android apps to Linux (don't laugh :) and I have come across a problem. When trying to execute an Android executable (app_process) after adding the executable permission with ./...
2
votes
4answers
790 views
Execute binary code
I have a binary code and I want to run it.
01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100
How can I create a file "application/x-executable" and ...
1
vote
1answer
95 views
Rc.local not running commands properly
I am running arch Linux and have used this rc-local service:
[Unit]
Description=/etc/rc.local compatibility
[Service]
Type=oneshot
ExecStart=/etc/rc.local
RemainAfterExit=yes
[Install]
WantedBy=...
73
votes
1answer
7k views
Why does the following script delete itself?
If you create an executable file with the following contents, and run it, it will delete itself.
How does this work?
#!/bin/rm
1
vote
2answers
131 views
How to know the path of a running executable?
I am working on a Linux server, and I running different jobs on different node.
However, when compiling my program, I didn't set their specific name, so they are all a.out
Now I found one of the ...
0
votes
1answer
69 views
executable files to normal files via terminal CentOS7
Today I copied some files from the shared folder (Host is a Win7) to my VM ( Guest is a CentOS7). I did this with root permissions. Then I copied th files to my apache location
/var/www/html/test
I ...
3
votes
1answer
410 views
How can I extract Signatures data from a Windows `exe` file under Linux using cli
If you go to the VirusTotal link , there is a tab called file info(I think; mine is dutch). You'll see a header called
"Authenticode signature block and FileVersionInfo properties"
I want to ...
4
votes
1answer
282 views
Why doesn't `strip` remove section headers from ELF executables?
A minimal ELF executable only requires the ELF header and at least one program header in order to be functional. However, when I run strip on a short executable, it decides not to throw out the ...
6
votes
1answer
632 views
Check last time .sh file used
When you run ./myscript.sh is that considered as "access" time?
I need to know the last time a script was run, but I'm not sure if this counts as mtime, ctime or atime (differences described here).
9
votes
4answers
815 views
How to install executables
I sometimes run into software that is not offered in .deb or .rpm but only as an executable.
For example Visual Studio Code, WebStorm or Kerbal Space Programm.
For this question, I will take Visual ...
0
votes
0answers
16 views
Bash fails to run executable with No such file or directory [duplicate]
I have an executable copied to an Ubuntu 14.04 AWS instance, and I:
chmod +x MyExe.bin
./MyExe.bin
And I get:
-bash: ./MyExe.bin: No such file or directory
This is strange because:
The file is ...
1
vote
1answer
254 views
Linux: How to mount a drive from command line
I normally mount my drives just by opening it from filesystem. It automatically mount when I open/click on a drive. But I wanted to mount a drive from command line. I did ran this command
sudo mount -...
1
vote
2answers
1k views
Which of /usr/bin/perl or /usr/local/bin/perl should be used?
If I have both /usr/bin/perl and /usr/local/bin/perl available on a system, which one should I use?
3
votes
1answer
313 views
Can not run executable files from a mounted drive
I have downloaded eclipse and rubymine and previously placed in home folder. Then I used to open both programs by double clicking on eclipse.sh and rubymine.sh.
Now I moved these two folders in a ...
0
votes
2answers
77 views
Executable file isn't “really there” after rsync [duplicate]
I am issuing the following rsync command (obfuscating the exact path & host), which should copy two binaries:
rsync -e "ssh -p 443" -a --info=progress2 -z user@remote:/srv/cgi-bin/ .
user@remotes'...
0
votes
1answer
237 views
File does exist but won't execute [duplicate]
I have a file that does exist but won't execute. It says : "No such file or directory".
This file is created by a script while creating a "custom toolchain" to compile native libraries for Android ...