I'm a basic user hoping to advance to an intermediate level. Ok, I've a file XAMPP(manager-linux-x64.run) which when i do a
sudo ./manager-linux-x64.run
It works. So, I was trying to go pro by doing this from its directory
ls | grep manager-linux-x64.run | sudo xargs ./
it doesnt work.it throws this error
xargs: ./: Permission denied
The file output of manager-linux-x64.run is
manager-linux-x64.run: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped
What I am essentially trying to do is
get a list of files in the directory ,
grep the executable,
pipe the output
and execute it using ./manager-linux-x64.run
since (sh,bash doesn't work on the .run file).
Moreover, is there any other command that can run a .run itself?
sudo ./manager-linux-x64.run
, I don't really get what you are trying to do. For what purpose were you "trying to go pro by doing this from its directory"? What do you really mean to accomplish? – Samuel Feb 22 '17 at 16:43xargs
to (try to) execute command./
with the results of yourls . . . | grep
as arguments – steeldriver Feb 22 '17 at 17:03for
loop orfind
command to iterate across them. – Sam Gleske Feb 24 '17 at 07:12