The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
19 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
42 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 ...
0
votes
1answer
28 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
54 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.
0
votes
2answers
34 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
1answer
41 views

How can I know whether a binary file is an executable or a library?

I have a binary file, but how can know the file type, lib or exe. By opening it with notepad++, it shows ELF and a lot of random symbols.
0
votes
2answers
24 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
36 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
269 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
350 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
212 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
55 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
883 views

Compile the kernel to increase the command line max length

Following up on http://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 ...
2
votes
1answer
429 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
80 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 ...
1
vote
3answers
3k 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
70 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
309 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
166 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
26 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 ...
2
votes
4answers
11k views

How to combine tar command with find

Find command giving 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 ...
1
vote
1answer
1k 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 ...
3
votes
1answer
10k 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
6k 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
618 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:" {} \; > ...
0
votes
1answer
782 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 ...
1
vote
2answers
487 views

Removing folder structure when making a tar from a folder

Ok I don't really want to waste any more time on investigating this but I do want to offer a .tar option for download instead of just zip. $archive = ...
0
votes
2answers
670 views

Expect: Modify Ctrl-C Behavior

While exec is running a program, I would like Ctrl-C to terminate the program and resume the script, instead of killing the script. What's the best way of accomplishing that?