Reputation: 318
I know what the ls -d does but I am confused about anonymous-*-* |\
part, can someone please explain this
ls -d $data/anonymous-*-* |\
assuming $data is a directory name
Upvotes: 1
Views: 103
Reputation: 633
It's called bash globbing, and is really useful for matching filenames and text. The *
wildcard matches any text at all. So anonymous-*-*
would match any filenames that begin with anonymous-
, and have another dash -
somewhere after that in the filename.
Upvotes: 1