linux - What does shell command ls [abc]*e*? search for? -


what files linux shell command

ls [abc]*e*? 

going for?

first, aware that, while many other commands use regular expressions, ls uses globs. let's break down glob [abc]*e*? matches:

  1. [abc] matches 1 character chosen set a, b ,or c.
  2. * matches number of character
  3. e matches e.
  4. * matches number of character.
  5. ? matches 1 character.

for example, consider directory these files:

$ ls a1w2e3z41  ae1  af1  de1 

the matches among these glob are:

$ ls [abc]*e*? a1w2e3z41  ae1 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -