Questions tagged [exec]
The exec tag has no usage guidance.
71
questions
0
votes
0
answers
4
views
What happens to child process once the shell command is completed? [migrated]
So i am using exec to open a shell and run a shell command for me which is:
exec('del filename & exit')
Using exit to close the Shell
I have to use this exec multiple times in a single run, i have ...
0
votes
2
answers
50
views
How can I run an exe from stdout?
I have a .exe file hosted as a release on a Github project, it is my project so I know this file is secure as I have compiled it. https://github.com/USERNAME/PROJECT/releases/latest/download/TORUN.exe ...
-2
votes
1
answer
104
views
untrusted executable "ln", should it be removed, if yes how?
I was inspecting the startup items to disabled non utilized applications and came across this item from unidentified developer.
What should I do about it? And how to proceed if is to be removed?
0
votes
0
answers
39
views
How do I get all executed commands programmatically in linux shell?
Despite having the history file, how do I programmatically get every command being executed in shell?
1
vote
1
answer
678
views
How do I make a shortcut (.lnk) to run a .exe file in the same folder so that it works when I switch computers (all file paths are different)
I have a folder on my PC. Within that folder, there is a shortcut (.lnk) and an executable file (.exe). When I click on the shortcut, the .exe file should run.
I have managed to achieve this no ...
0
votes
1
answer
350
views
How to pipe data from one terminal to another under Windows with Ubuntu and WSL
The problem arise to provide online help to developers using an interpreter, and has been realised with Cygwin + mintty + a home grown interpreter. So relevance and principles are well known in a ...
-1
votes
1
answer
754
views
How to run exec command in a loop until it is successful
I want run exec $Docker-run command until it's successful on redhat linux. Looping over it?
$Docker-run = docker run --env-file .env Image-name
Can anyone provide a solution?
1
vote
1
answer
3k
views
running sudo with PHP
Yes, there are many answers to a similar question, but mine is a bit more specific. I want to add the user running apache, www-data to sudoers, but everywhere I've read, they have added specific files ...
0
votes
1
answer
201
views
How can I perform start command in PowerShell same as I do in CMD?
When I use start command in CMD it opens second CMD window with the same state (same location and same virtual environment). But I cannot do it in PowerShell. Is there any command for it in PowerShell?...
1
vote
0
answers
394
views
What is the difference between running a from cmd line vs. double click?
I have a miner program and if i double click and run it, it works fine, but if i run it from the cmd line using executable name it doesnt run, it crashes.
I tried to run with CreateProcess function ...
0
votes
0
answers
433
views
How can I stop firewalld from interrupting an existing outgoing ssh exec session when it is started or restarted?
I have a java program running on a Centos7 server that continuously "tails" a file on another Centos7 server using the JSch library to run an ssh exec process to run a shell script on the ...
0
votes
0
answers
91
views
Circular pipe in bash
I need a circular pipe in Bash.
This doesn’t work:
exec 3>&1 | socat | awk | socat >&3 #exec 3>&1
This works:
exec 3> /dev/stderr ; echo test >&3
Can somebody provide ...
2
votes
3
answers
682
views
How to chain/connect multiple -exec commands with find * and ls?
Problem
I use find -exec curl in ubuntu console to list all files in directory and send them to FTP server:
find * -type f -exec curl -u ***:*** --ftp-pasv --ftp-create-dirs -T {} $PATHDEST/{} \; -...
-1
votes
1
answer
700
views
How to silently execute exe file without a opening dialogue? [duplicate]
I hide two files with rar. An image file and an exe file. When I execute this I get exe file dialogue appearing on the screen. But I don't want to see it. How to do that?
https://i.stack.imgur.com/...
1
vote
0
answers
94
views
unable to execute VBoxManage command in python executable (created with pyinstaller)
OS: Ubuntu 16.04 LTS
make an install.py file executable:
pyinstaller -w install.py --onefile
install.py script:
import os
VM = os.system('VBoxManage startvm win10 --type headless')
if VM == 0:
...
0
votes
1
answer
435
views
Why can't redirect stderr into a file with exec?
I want to redirect stderr into a file /tmp/mytest:
exec 2> /tmp/mytest
Press enter after input exec 2> /tmp/mytest, the cursor remains there,why command exec 2> /tmp/mytest can't fulfill?
1
vote
1
answer
662
views
find -exec grep {} \; egrep -v string \; # the command chain brakes
I'm playing with find command to see how it behaves and I'm a bit lost.
First bit is fine :
find . -maxdepth 1 -exec grep -l abc {} \;
grep: .: Is a directory
./file2.pdf
./file1
Then I try to ...
0
votes
1
answer
536
views
How to copy grepped files using Find, Grep and Exec in Git Bash
I've looked everywhere for an answer and nothing seems to be working out. In Git Bash, I need to figure out how to take files found with grep and copy them elsewhere. The instructions were to use the ...
1
vote
2
answers
1k
views
Is there a way to execute software from EXT4 partitions on Windows 10?
Right, my scenario is that I have a Linux system set up and I was thinking about maybe setting up a Windows 10 dual boot, for reasons.
The problem is that I like gaming, and I have a hard drive ...
4
votes
2
answers
3k
views
Redirection or pipe inside `find -exec`
Any "find -exec" guru's around.
I have a folder of files I need to send to sendmail (they appear in there when something bad has happened).
The command
find . -type f -exec sendmail -t < {} \;
...
2
votes
1
answer
1k
views
What does + mean in the bash `-exec command {} +`?
For the command structure -exec command {} \;,i got info in man find.
{} means selected files.
; means trminate the argument.
\; escaped to protect them from expansion by the shell.
In the ...
0
votes
1
answer
536
views
Tweaking sfx exe file not to be opened by WinRAR or any other extraction utility
Is it possible to change a .sfx.exe file to disguise its real identity and behave like a real PE?
Is there any other packager tool to make a standalone or autonomous exe that consists of, for example,...
0
votes
0
answers
836
views
nohup process keep shutting down
I am trying to run 10.000 processes to create asterisks phone accounts.
This is to stress-test our Asterisk server.
I called with php an exec() function to create a Linux command.
nohup /usr/src/...
1
vote
1
answer
88
views
Only last tee writes to file (possible overlap with exec?)
I try to have all my outputs redirected to a.out, except some that must also be written to b.out. I think using exec on top of tee (tee to also redirect to b.out) would be fine but tee does not look ...
0
votes
1
answer
155
views
find multiple files, and copy real files from symlink
I was reading this question but it hasn't answer, and the mine its different.
Linux: Trying to find files from a list recursively and copy them somewhere else
I'm trying to find the real files from ...
1
vote
1
answer
286
views
rm -irf -Irf with find
why below statement do not ask for confirmation while using option i or I for rm ?
// pass aggregated
find . -name $name -type d -exec rm -irf {} \;
// pass each
find . -name $name -type d -exec rm -...
2
votes
2
answers
70
views
abort spawned program when it prints a specific warning
My Bash 4 script calls a third-party program P (one that I can't recompile), which prints warnings to STDOUT. When it prints yikes, it also enters an infinite loop. So when I detect a yikes, how can ...
1
vote
1
answer
1k
views
How to NOT include parent directories when using zip command?
I need to:
Traverse a directory and find all sub-sub-folders created for > X days ago
Zip the content of these folders inside the sub-sub-folder and remove the
previous content
Example of file ...
2
votes
1
answer
4k
views
How do I open fonts I've been sent which are showing up as 'exec' files?
This question is regarding to InDesign and fonts:
I just received a zip with fonts from a client, but unfortunately they are all exec files (whatever that is) and I can't open them.
What should I ...
1
vote
0
answers
536
views
Opening a video through PHP's shell_exec fails on Mac OS X
I'm hosting a local web application on my computer (Mac OS X) which contains a button to open a video with QuickTime. On button click an AJAX request is made to a PHP script with the following content:...
1
vote
0
answers
13k
views
WsAppService.exe or Wondershare, is consuming all my RAM
Recently my PC started to freeze. The RAM was being clobbered.
I do what I always to CNTRL + ALT + DEL to open taskmgr.
Well non of the processes were there.
So I decided to check Resource Monitor ...
1
vote
1
answer
218
views
who forks when the applications are double clicked on Linux?
So I know when in shell and I run an executable then shell forks it into a child process and later exec's to get the program and data memory of my executable. So if my shell is now closed/exited then ...
37
votes
4
answers
11k
views
How can I run an untrusted executable on linux safely?
I have downloaded an executable compiled by a third party and I need it to run on my box (Ubuntu 16.04 - x64) with full access to HW resources such as CPU and GPU (through nVidia drivers).
Suppose ...
2
votes
1
answer
164
views
Find files and group into directories
I have a folder and sub folders and massive numbers of files as follows:
Folder called Movies
Sub Folder called "009 - A bad Wolf"
Files called " 009 A bad Wolf.avi"
Files called " 009 A bad ...
0
votes
0
answers
1k
views
Set volume using php exec and amixer
I wrote a little php script to control the volume of my local machine with alsa:
<?php
# for simplicity and testing it really just executes the command:
echo exec('amixer set Master 5%+') . " \n";
...
1
vote
2
answers
2k
views
find and exec on only filename
I need to find all files older than X days and delete them locally and from my s3 bucket. The problem is the find command returns me the full path and filename too. I tried messing with basename and ...
1
vote
0
answers
367
views
How to kill a process that calls execv?
A process that calls execv is not dying, by, what looks like, design.
Example borrowed from here:
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
main() {
pid_t ...
1
vote
1
answer
103
views
How to launch this particular script from any desktop at any location?
This part seems to be the code to modify:
Set fol = fso.GetFolder("c:\TEST")
How can I change that so that it works on any computer from any location/path?
Would I need to integrate an additional ...
0
votes
1
answer
567
views
How to execute shell script from PHP with non-standard extension?
I've Windows with shell integration installed from Git (as well as Cygwin) and the following PHP code fails to run external shell script which has .launcher extension:
<?php
passthru("foo.sh&...
1
vote
1
answer
316
views
Construct command for bash exec
I have a shell script that runs exec to replace itself with another command. The other command takes some optional arguments.
exec mycommand $ARG1 $ARG2 $ARG3
Any of these arguments could be ...
1
vote
1
answer
168
views
Empty line appears while merging different file contents in shell script
I have written shell script to merge different file's contents I have created directories f1,f2,d1,d2 and files under them , I need to merge all files's contents : comand is
find /home/ah5024331/f1 /...
0
votes
1
answer
2k
views
Can't find executable (pipsi) in my PATH even though my PATH is set correctly and permissions are also correct in ZSH
I have just installed pipsi. I'm on Mac OS X Yosemite and I'm using iTerm and running zsh via oh-my-zsh.
My problem is that I get the following:
~ >>> pipsi
zsh: command not found: pipsi
...
0
votes
1
answer
533
views
How to rename files to monotonically incrementing sequence numbers followed by a suffix?
I want to rename all files under a particular directory to a number followed by a suffix. For example, I want to rename all *.jpg files to 1.jpg, 2.jpg, 3.jpg, ...
I thought about using find for this ...
5
votes
2
answers
2k
views
Why does sudo fork before executing the process?
This question may seem a bit silly, but since in Unix-based systems, replacing an executable's image is done in a single step, replacing the currently running process, in the function call execve (and ...
2
votes
1
answer
956
views
Linux find command with multiple command -exec using chown and chmod
The following command runs but the two -exec commands don't run - so the file gets moved but the permissions and file owner doesn't change.
find ~/Downloads/ -name "2014-12-24*"
-exec sudo mv {} ~/...
0
votes
1
answer
1k
views
Shell script force stop without waiting for the exit code
I have written a shell script checklick.sh on my CentOS box with the following content:
#!/bin/sh
#
# description: check link through rtmpdump
#
. /etc/rc.d/init.d/functions
DUMPUTIL=/usr/bin/...
0
votes
1
answer
112
views
Open file using bash with unix executable
I have an application which loads using a bash script e.g
/Applications/My.app/Contents/MyExecutable
I can load this using bash like so
"/Applications/My.app/Contents/MyExecutable"
However, I ...
1
vote
0
answers
568
views
How to enable program execution blocked by domain group policy
How can i enable program execution from any path in local computer using regedit when it's blocked by domain policy?
I managed to remove policy restrictions from registry but this one escaped.
2
votes
2
answers
2k
views
How to make a copy of file in the same directory
This creates a file in the same directy as 'some.file.bak'.
find /home/ -ipath "*/temp/some.file" -type f -exec cp {} {}.bak \;
How to make a copy in another name such as 'another.file' in the ...
3
votes
2
answers
3k
views
How to execute files which are found by find
I have some executable files under a directory tree. I want to find them and execute them the most simple way.
I've tried this so far:
find . -perm 0775 -type f | xargs exec
But exec is not an ...