I have a command called youtube-dl .. but dont know where it is installed.. i can run it from shell.. how do i find where it is installed ? which youtube-dl doesnt say anything..
+1
A:
Have you tried
whereis youtube-dl
?
Otherwise you could just search for it:
find / -name youtube-dl
Felix Kling
2010-08-04 09:16:48
+3
A:
If you can't find it with which
(or whereis
) then it could be:
- a function defined in .bashrc or .profile (or some other file the shell loads on startup or login)
- an alias defined in one of the above files.
You can search your environment for youtube-dl:
$ set | grep youtube-dl
or save it to some file and load it into a texteditor:
$ set >myenv
$ open -a textedit myenv
and for the aliases:
$ alias >myalias
or
$ alias | grep youtube-dl
Luther Blissett
2010-08-04 09:25:56
But you won't find aliases with it. In this case try e.g. `less .bash_profile | grep youtube-dl`.
Felix Kling
2010-08-04 09:33:52
@Felix: Oh yes, thank you. Fixed (I hope)
Luther Blissett
2010-08-04 09:37:44
Hey Luther, you are right. It was an alias and I was never able to find it in which and whereis.
Deepan Chakravarthy
2010-08-06 04:34:49
+3
A:
Bash has a command that will show whether a command is an alias, a function or an executable in your path (and, if so, where):
type -a youtube-dl
It's much better than which
.
Dennis Williamson
2010-08-04 13:37:09