Skip to content

Instantly share code, notes, and snippets.

@bennlee
Last active April 18, 2024 14:49
Show Gist options
  • Save bennlee/92ffaa27eea326da46e538a80c3eebae to your computer and use it in GitHub Desktop.
Save bennlee/92ffaa27eea326da46e538a80c3eebae to your computer and use it in GitHub Desktop.
What does the double asterisk(**) mean in the path?

What does the double asterisk(**) mean in the path?

There's two meaning of wildcards in paths for file collections.

  • * is a simple, non-recursive wildcard representing zero or more characters which you can use for paths and file names.
  • ** is a recursive wildcard which can only be used with paths, not file names.

For examples,

  • /var/log/** will match all files in /var/log and all files in all child directories, recursively.
  • /var/log/**/*.log will match all files whose names end in .log in /var/log and all files in all child directories, recursively.
  • /home/*/.bashrc will match all .bashrc files in all user's home directories.
  • /home/*/.ssh/**/*.key will match all files ending in .key in all user's .ssh directories in all user's home directories.

Reference

@bennlee
Copy link
Author

bennlee commented Apr 18, 2024

@rajatrj16
Oh, I see. It doesn't seem to be supported by sumologic.
(I'll also fix the text. Thank you for your correction.)

As you said in the above case, I think we should consider reducing the dynamic depth on the structure level or distributing the collector to the per dynamic depth.
This way could also reduces the searching load, so I think it would be better to consider it as an alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment