Matching hidden files
suggest changePreparation
$ mkdir globbing
$ cd globbing
$ mkdir -p folder/{sub,another}folder/content/deepfolder/
touch macy stacy tracy "file with space" folder/{sub,another}folder/content/deepfolder/file .hiddenfile
$ shopt -u nullglob
$ shopt -u failglob
$ shopt -u dotglob
$ shopt -u nocaseglob
$ shopt -u extglob
$ shopt -u globstar
The Bash option dotglob lets globs match hidden files and folders, that is, names that start with a .:
$ shopt -s dotglob
$ echo *
file with space folder .hiddenfile macy stacy tracy
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents