> For the complete documentation index, see [llms.txt](https://hexisanoob.gitbook.io/hexisanoob/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hexisanoob.gitbook.io/hexisanoob/post-exploitation/linux-privilege-escalation/wildcards-basics.md).

# Wildcards - Basics

Learnt on TryHackMe's Skynet challenge

Wildcards are symbols or set of symbols which when used in a command can represent a variety of options.\
For example:\
\* => Asterisk in linux means everything. So, if I were to do " cp \* /home/kali/" I would be copying everything in the current directory to /home/kali.<br>

Wildcards are useful as they reduce human effort. Example, using \* can reduce the effort of manually typing in every file in the existing directory ot be copied.

Other wildcards:\
? => represents each character\
\[] => group of characters\
\~ => home directory\
\- => A hyphen used within \[ ] denotes a range of characters\
\-- => Option flag in various linux tools. Eg: cat **--**&#x68;elp\
\
Reference: <https://linuxhint.com/bash_wildcard_tutorial/>

IMPORTANT: When wildcards are used within a filename, it is an insecure practice of administration as the usage of wildcards can cause unforeseen errors in routines, jobs and can cause privilege escalation and exploitation too.
