The glob

suggest change


$ 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 asterisk * is probably the most commonly used glob. It simply matches any String

$ echo *acy
macy stacy tracy

A single * will not match files and folders that reside in subfolders

$ echo *
emptyfolder folder macy stacy tracy
$ echo folder/*
folder/anotherfolder folder/subfolder

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents