Is it possible to recursively add a directory to my $PATH variable? Let's say I have a directory structure like the following:
/usr/local/bin
- /nodejs-x.x
- /redis-x.x
- /mongodb-x-x
Can I add /usr/local/bin
to the $PATH and allow it to recursively cover the subdirectories?
Best Answer
Not directly, no. Entries in
$PATH
are not recursive.What you can do is:
Another option is to put symlinks in
/usr/local/bin
: