Questions tagged [exec]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
39 views

Start .bat file via php

I'm using system('START C:\[address]\refresh.bat'); but when I start this I get: C:\[address]>git fetch 'git' is not recognized as an internal or external command, operable program or batch file. ...
Hopm Mpoн's user avatar
0 votes
1 answer
55 views

Script to install Anaconda and update conda

I want to write a shell script (zsh) that does the following: Installs Anaconda via Homebrew. Adds conda to PATH in .zshrc. Updates conda base environment. I have come up with the following solution:...
NilsK's user avatar
  • 145
0 votes
2 answers
161 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 ...
ty246's user avatar
  • 21
-2 votes
1 answer
119 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?
Peter Koller's user avatar
0 votes
0 answers
72 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?
RickyLo's user avatar
  • 17
1 vote
1 answer
1k 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 ...
Matthias's user avatar
0 votes
1 answer
514 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 ...
Jørgen Steensgaard's user avatar
-1 votes
1 answer
861 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?
skillshot07's user avatar
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 ...
CryptoRhino's user avatar
0 votes
1 answer
257 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?...
Kyoko Sasagava's user avatar
1 vote
0 answers
502 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 ...
C.Unbay's user avatar
  • 95
0 votes
0 answers
633 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 ...
Ross's user avatar
  • 1
0 votes
0 answers
128 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 ...
iwl's user avatar
  • 1
2 votes
3 answers
2k 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/{} \; -...
marcinpl87's user avatar
-1 votes
1 answer
963 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/...
Sandesh's user avatar
1 vote
0 answers
112 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: ...
ahsan azeem's user avatar
1 vote
1 answer
561 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?
showkey's user avatar
  • 149
1 vote
1 answer
786 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 ...
Tomas.R's user avatar
  • 195
0 votes
1 answer
753 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 ...
jbingham1227's user avatar
1 vote
2 answers
2k 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 ...
Cestarian's user avatar
  • 1,903
5 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 < {} \; ...
Richard's user avatar
  • 53
2 votes
1 answer
2k 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 ...
scrapy's user avatar
  • 163
0 votes
1 answer
578 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,...
hussein5's user avatar
0 votes
0 answers
924 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/...
Wesley Schravendijk's user avatar
1 vote
1 answer
107 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 ...
Vulpo's user avatar
  • 305
0 votes
1 answer
181 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 ...
joseluisbz's user avatar
1 vote
1 answer
303 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 -...
ceph3us's user avatar
  • 125
2 votes
2 answers
71 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 ...
Camille Goudeseune's user avatar
1 vote
1 answer
2k 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 ...
John Doe's user avatar
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 ...
Hans's user avatar
  • 21
1 vote
0 answers
540 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:...
mythbu's user avatar
  • 111
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 ...
ejbytes's user avatar
  • 2,030
1 vote
1 answer
247 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 ...
Anurag's user avatar
  • 123
39 votes
4 answers
12k 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 ...
Emanuele's user avatar
  • 741
2 votes
1 answer
178 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 ...
seanbw's user avatar
  • 983
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"; ...
Markus Kottländer's user avatar
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 ...
KisnardOnline's user avatar
1 vote
0 answers
375 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 ...
tarabyte's user avatar
  • 2,283
1 vote
1 answer
120 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 ...
Claudia L.'s user avatar
0 votes
1 answer
578 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&...
kenorb's user avatar
  • 25.3k
1 vote
1 answer
331 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 ...
Nick Retallack's user avatar
1 vote
1 answer
173 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 /...
user's user avatar
  • 199
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 ...
tadasajon's user avatar
  • 317
0 votes
1 answer
617 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 ...
Gabrijel Šimunović's user avatar
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 ...
ssice's user avatar
  • 904
2 votes
1 answer
1k 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 {} ~/...
skibumdreamer's user avatar
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/...
PinoyPal's user avatar
  • 153
0 votes
1 answer
122 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 ...
Ke.'s user avatar
  • 343
1 vote
0 answers
580 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.
CodeArtist's user avatar
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 ...
13th Matrix's user avatar