I cd to my home directory and typedls *bash*expecting it will show a list of files contains bash. However it is not.While, typing ls .bash*works.According to the documentation, * stands for any character, right? But it seems that it doesn't represent . in this case. What is wrong?
why ls *bash* doesn't show the .bashrc file
linux;bash;wildcards
The dotglob shell option controls this:$ shopt -s dotglob$ ls *bash*.bash_history  .bash_logout  .bashrcIt is not enabled by default, probably as a usability/safety measure, since most end users don't have to worry about dotfiles and could very easily delete critical home directory files (such as .config, .ssh) by accident.