Which wildcards will match the following filenames?

Which wildcards will match the following filenames? (Choose two.) ttyS0 ttyS1 ttyS2
A. ttyS[1-5]
B. tty?[0-5]
C. tty*2
D. tty[A-Z][012]
E. tty[Ss][02]

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “Which wildcards will match the following filenames?

    1. # touch ttyS0 && touch ttyS1 && touch ttyS2 && ls
      ttyS0 ttyS1 ttyS2
      # ls ttyS[1-5] && ls tty?[0-5] && ls tty*2 && ls tty[A-Z][012] && ls tty[Ss][02]
      ttyS1 ttyS2
      ttyS0 ttyS1 ttyS2
      ttyS2
      ttyS0 ttyS1 ttyS2
      ttyS0 ttyS2

      Definitely B and D.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.