Ran into some strange behavior today. Wondering if anyone here can tell me what is behaving differently. Environment is a RHEL 6.7 server.
I run the following command:
yum list installed *mysql*
If my cwd is / or a number of other places I get the following output:
Installed Packages
MySQL-client-advanced.x86_64 5.6.27-1.el6 @/MySQL-client-advanced-5.6.27-1.el6.x86_64
MySQL-server-advanced.x86_64 5.6.27-1.el6 @/MySQL-server-advanced-5.6.27-1.el6.x86_64
MySQL-shared-advanced.x86_64 5.6.27-1.el6 @/MySQL-shared-advanced-5.6.27-1.el6.x86_64
MySQL-shared-compat-advanced.x86_64 5.6.27-1.el6 @/MySQL-shared-compat-advanced-5.6.27-1.el6.x86_64
In a few other folders (including /opt on this server) I run the same command and get this output:
Error: No matching Packages to list
Now I know that I usually need to escape the wildcard in this command. If I run it as:
yum list installed \*mysql\*
then I get the correct output in both locations. I gather this is because of how bash globs wildcards. What I really want to know right now is why it globs it in one folder but doesn't in the other. I'm running both as root, printenv shows identical output (other than PWD), literally the only thing that changes between running the command both times is cd /opt
Can anyone tell me why this is happening or what things to look at to see why it might be different? TIA