Questions tagged [exec]
The exec tag has no usage guidance.
65
questions
-1
votes
1
answer
74
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?
0
votes
1
answer
233
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
74
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
61
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
75
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
49
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 ...
1
vote
2
answers
127
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
141
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
28
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
42
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
352
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
233
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
949
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 ...
3
votes
2
answers
1k
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 < {} \;
...
1
vote
1
answer
800
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
335
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
577
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
55
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
116
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
234
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
738
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
3k
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
479
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
161
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 ...
33
votes
3
answers
10k
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
127
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
1k
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
320
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
95
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
518
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
282
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
105
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
435
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
790
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
77
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
543
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
2k
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 ...
-1
votes
1
answer
121
views
Difference between an install EXE and the EXEs found within the install folder [closed]
What is the difference between an installation EXE and the EXE files that are found within the installation folder?
For example:
The VLC media player install is called "vlc-2.1.3-win64.exe" and is ...
0
votes
1
answer
3k
views
Stop execution of a function after a given time in PHP
I have five exec() functions in my script. I want to set it up so that if a function fails to respond in a given time, the function will be killed and the next function will start its execution.
<?...
1
vote
0
answers
2k
views
execl: couldn't exec `/bin/sh'
I accidentally moved the whole bin, boot, dev and etc directory.
After moving everything back I get the following error email from various cron jobs:
execl: couldn't exec `/bin/sh'
execl: No such ...
1
vote
2
answers
2k
views
How to invoke shell script while staying in interactive mode
When I call:
execl("/bin/sh", "/bin/sh", (void *) NULL);
The /bin/sh/ program is started, which opens a shell in which I can type commands. However, if I call:
execl("/bin/sh", "/bin/sh", "~/...
2
votes
4
answers
379
views
Is there a way to use > operator in find -exec
I'm trying to empty lots of files under a certain folder.
>file or cat /dev/null > file or echo "" > file can empty file.
find . -type f -exec blahblah {} \; can find files and do something ...
0
votes
1
answer
7k
views
Compile the kernel to increase the command line max length
Following up on https://stackoverflow.com/questions/14176089/system-command-line-max-length-in-perl, which say the max length for exec/command line arguments is controlled by ARG_MAX.
So I want to ...