Wildcard in Linux

First and most important question: what is Wildcard in Linux?

Answer is wildcard is specific symbol use in Linux terminal for replacing numbers and letter for example:- * (star), ? (question mark), [ ] (square brackets), { } (curly brackets), [!] (bang), \ (backslash) etc.

We will see how to user this symbol with example

In this article I use only ls command you can use any command because pattern is same for all command.

How to use * (star) wildcard in Linux

* (star) wildcard most usable because star replace every latter number including zero.

.* (dot and star)

* (star)

How to use ? (question mark) wildcard in Linux

After star wildcard ? (question mark) is most usable below see the how to use question mark.

?.txt

??.txt

file?.*

How to use [ ] (square brackets) wildcard in Linux

ip[1]*

ls [1].txt

ls [A]*.txt

ls file[12345] or ls file[1-5]

ls [A]*.txt

How to use { } (curly brackets) wildcard in Linux

How to use [!] (bang) wildcard in Linux

How to use \ (backslash) wildcard in Linux

Scroll to Top
Top 7 Gaming Project In python Save ₹25,000 Laptop under ₹11,999 Top 7 Funny error in Python Unicodeescape Most dangerous error in Python Hero Electric Battery Price In 2023