![]() |
|
Tutorial Wildcard Characters - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Hacking (https://sinister.ly/Forum-Hacking) +--- Forum: Tutorials (https://sinister.ly/Forum-Tutorials) +--- Thread: Tutorial Wildcard Characters (/Thread-Tutorial-Wildcard-Characters) |
Wildcard Characters - Eclipse - 03-27-2015 A wildcard, is a character that represents a string of any characters or a single character. The reason it's called a wildcard, is because any character can be assigned to it. There are different wildcards in Linux, namely the Star (*), the Question Mark (?), and the Square Brackets ([]). They each work differently, as is explained below. The Star Wildcard This character is the most common, and also the one with the broadest meaning. It can represent a string of any characters, a single character, or even zero characters. For example: Code: cat *.txtCode: rm *Code: ls *lel*.*The Question Mark Wildcard The question mark wildcard is similar to the star wildcard, but it only represents any single character. For example: Code: ls ?????.???Code: rm ??*Code: oni-is-???The Square Brackets Wildcard This type of wildcard represents of the characters enclosed in the brackets. Optionally, hyphens can be added to declare ranges. For example: Code: *[sex]*Code: [a-z0-9]Code: [abc]*.*You can string multiple square brackets together like so: Code: *.[a-z][a-z][a-z]Hope you learned something, Eclipse |