본문 바로가기
WEB/Linux

Wildcards

by Zayne 2024. 1. 29.

A wildcard is a character that can be used as a substitute for any of a class of characters in a search.

 

  • * - represents zero or more characters
  • ? - represents a single character
  • [ ] - represents a range of chracters

 

As you can see, if you created some files like below, it's not productive.

 

Instead of creating each files, you can use a '{ }' wildcard.

 

 

when you remove from abc1 to abc9, you can use a wildcard as well.

 

rm abc*
or
rm abc?

 

Then, what is the difference between " abc* " and " abc? "?

" abc* " represents that it could be more than 4 letters.

Conversely, " abc? " means it's only 4 letters.

'WEB > Linux' 카테고리의 다른 글

Soft and Hard links  (0) 2024.01.30
Difference between find and locate  (0) 2024.01.29
명령어(find, locate)  (0) 2024.01.28
명령어(touch, cp, vi, mkdir)  (1) 2024.01.28
Linux File Properties  (0) 2024.01.27