What does asterisk "*" mean in a unix PATH environment variable?

-1

1

Example:

# echo $PATH
/home/admin*:*/bin

I assume it's a wildcard of some sort, but is it one level deep, or many?

For example, will */bin match only items in usr/bin or will it also match deeper items in usr/local/bin and /home/admin/bin? And will /home/admin* match /home/administrator and everything under it, also at multiple levels?

Matt Woelk

Posted 2015-12-07T14:57:57.470

Reputation: 177

If this belongs in the Unix & Linux StackExchange site, please let me know how I can migrate it over. – Matt Woelk – 2015-12-07T14:59:26.390

Answers

4

What does asterisk (*) mean in a unix $PATH?

# echo $PATH
/home/admin*:*/bin

It means you have an invalid $PATH.

$PATH does not support wildcards.

DavidPostill

Posted 2015-12-07T14:57:57.470

Reputation: 118 938