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 [exec]

The tag has no usage guidance.

0
votes
1answer
46 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
1answer
30 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
0answers
142 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
1answer
30 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
1answer
68 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 ...
0
votes
0answers
484 views

How do I find all accepted command line arguments of an executable

I'm aware that there have already been multiple there have been multiple threads on this topic, (such as here), however there is a slight variation to this question. The method described in the post ...
1
vote
1answer
96 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
2answers
54 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
1answer
262 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 ...
3
votes
1answer
1k 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
0answers
226 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
0answers
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
1answer
99 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 ...
34
votes
3answers
6k 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
1answer
115 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
0answers
598 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
2answers
670 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
0answers
146 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
1answer
77 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
1answer
394 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
1answer
139 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
1answer
63 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
1answer
1k 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
1answer
260 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 ...
4
votes
2answers
1k 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
1answer
539 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
1answer
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
1answer
59 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
0answers
484 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.
1
vote
2answers
1k 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 ...
0
votes
2answers
909 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
1answer
69 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
1answer
2k 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
0answers
1k 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
2answers
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
4answers
96 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
1answer
5k 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 ...
9
votes
1answer
4k views

Batch run mogrify including subdirectories

The command mogrify -format jpg *.NEF when run in a directory converts all *.NEF files to JPEGs. What I want to do is to be able to run mogrify in *.NEF files inside subdirectories as well using one ...
0
votes
1answer
137 views

Preventing Apache to access root FS via exec

Actually I discovered that I can access the root via exec in php something like <?php echo exec('cat /etc/passwd'); ?> will print the content of the passwd file, note that with cd command ...
2
votes
3answers
7k views

Argument list too long for xargs/exec

I'm working on a CentOS server and I have to move around and cat together millions of files. I've tried many incarnations of something like the below, but all of them fail with an argument list too ...
1
vote
1answer
106 views

Pass result of the command to exec

I have a kind of "bash newbie" question: how do I pass the result output of one command to exec. The result of the first command is the name of other command, so exec should be able to execute it.
0
votes
0answers
991 views

PHP exec iconv doesn't work

I have an .sh script and an iconv command inside. I can't use the PHP iconv function. I don't knwo why but with my script the iconv command doesn't do anything. It's creating an empty file without ...
0
votes
1answer
222 views

GNU find .extension files and -exec, while new .extension files are being made

Here is a problem, can someone please explain or provide some references. I've been trying to read since an hour but can not find the answer. Suppose, I have process1 going on a pool of directories. ...
0
votes
1answer
35 views

backup time machine style

I would like to find a more solid and handy solution to my small problem.. My idea is to backup every midnight my home directory incrementally, so I want only the modified files (of today) to be ...
25
votes
6answers
67k views

How to combine the 'tar' command with 'find'

The find command gives this output: [root@localhost /]# find var/log/ -iname anaconda.* var/log/anaconda.log var/log/anaconda.xlog var/log/anaconda.yum.log var/log/anaconda.syslog var/log/anaconda....
2
votes
2answers
3k views

ffmpeg working when SSH but not when PHP exec

I am not sure why so first here is the error Array ( [0] => ffmpeg: error while loading shared libraries: libvpx.so.1: failed to map segment from shared object: Permission denied ) my PHP exec('...
7
votes
2answers
43k views

Perrmission to run specific command by sudo as www-data users without password

I have a webserver that also plays internet radio. As www-data user I want to run some commands, for example I've made this in /etc/sudoers file: www-data ALL=(ALL) NOPASSWD: /usr/bin/amixer ...
2
votes
2answers
15k views

execvp: No such file or directory

I wrote a script ~/_bin/bcg to call another script that uses gimp to re-size a random image from a directory and then write it back out to another file. My (toplevel) script then uses hsetroot to set ...
2
votes
2answers
1k views

Why is find exec grep > file an Infinite Loop?

I was trying to collect all of the Message-ID: headers (lines) in a directory with 200K .eml (plain text) files. A bit naively, I said: find -type f -exec grep -Fi "message-id:" {} \; > messageids....
0
votes
1answer
2k views

Script that runs a command with 'exec' doesnt end until 'Enter' is pressed

We have a KSH script that runs a process using exec and hangs. We want to be able to run it automatically and keep it running in background. We tried this: ./myScript.ksh & However this left us ...