View Single Post
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#19
Originally Posted by OVK View Post
I just checked it with "help" command which did not show the cp

Anyway, I got the script copied to /usr/local/bin but this seems to not work from there (output is
Code:
~/bin/sh: yle-dl: not found
even if the script definately is there).

So it seems that the script should be executed from ~/bin. I copied the script also there but now I get error
Code:
sh: yle-dl: Permission denied
(even if I try to execute script as root which should not be needed).
Any directory shown in you system's $PATH variable will work. You can check where the shell looks for executables like this:
Code:
~ $ echo $PATH
/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
/usr/local/bin exists in pretty much any *nix system. ~/bin is usually user created.

When an executable file resides in any of those directories you can run it by typing its filename and pressing enter no matter what your present working directory is. When the file is not in those directories you have to use full or relative path to it in order to run it. (/path/to/yle-dl). That's why it's more convinient to put it in one of those "bin" directories.

So the error message you got just means that the file has no executable permission. To make it executable for all users:
Code:
$ chmod a+x ~/bin/yle-dl
or
Code:
# chmod a+x /usr/local/bin/yle-dl
depending where you want to keep it.

Sorry I didn't mention all the details earlier. I use mostly linux so I presumed it was obivious. These are just generic shell commands.

Ps. If someone wants to package yle-dl and put it with my rtmpdump packages to openrepos feel free to do so. It would make installation bit easier for non-initiated. I'm probably too lazy to do it myself.

Last edited by ladoga; 2014-11-27 at 16:08.
 

The Following User Says Thank You to ladoga For This Useful Post: