On Centos and Debian I tried this.
Does the * with the ls command imply recursive search?
If I start to type a dir name and hit tab I see this:
# ls /etc/rc<tab>
rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/ rc.local rcS.d/
I thought if I put an asterisk in the path I would see the same thing but instead it did a recursive search:
# ls /etc/rc*
/etc/rc.local
/etc/rc0.d:
K50netconsole K90network
/etc/rc1.d:
K50netconsole K90network
/etc/rc2.d:
K50netconsole S10network
/etc/rc3.d:
K50netconsole S10network
...
The windows dir command would just show me the directories matching /etc/rc* how can I get this behavior from ls (without using the tab key)?
****Edit/Update:
OK so now I understand * is interpreted by bash instead of the command, but is it always interpreted as "enumerate file and folder entries" or if I use it in a different context does it do something else and if so is there like some big if statement in bash that says "if * used with file system paths return file and folder names, if * used with rpm (like rpm -qa post*) return package names, etc"
touch postxpto
followed byrpm -qa post*
.