I see this command being given as how to search and replace strings in files in this answer:

sed -i -- 's/foo/bar/g' **/*(D.)

What does the pattern */*(D) mean? I am not sure what they are called, so cannot google them. Is this part of sed parameters, or is it part of zsh? Thanks!

  • 2
    For the parenthesis part, with tab completion enabled you can type echo *( and then mash TAB to see a quick name/description table of the glob qualifiers. – thrig Dec 14 '16 at 20:22

The generic name is glob qualifiers. For zsh there is a list under the Filename Generation section of the documentation.

Patterns used for filename generation may end in a list of qualifiers
enclosed in parentheses. The qualifiers specify which filenames that 
otherwise match the given pattern will be inserted in the argument list.

In particular:


    plain files



    sets the GLOB_DOTS option for the current pattern 
  • Also, just for completeness sake, ** matches directories recursively. – Adaephon Dec 19 '16 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.