Skip to main content
  1. Public practice questions
  2. AZ-104 Practice Exams | Azure Administrator Associate
  3. AZ-104 Practice Exam 14

Question 5 — AZ-104 Practice Exam 14

Two different Bash wildcard patterns can be used to list both .jpg and .jpeg files. Which two accomplish this? (Select two answers)

  1. ls *.jpg *.jpeg

  2. ls .jpg

  3. ls *.png

  4. ls 000?.jpg

Correct answers

  1. ls *.jpg *.jpeg

  2. ls .jpg

Explanations

Correct:
ls *.jpg *.jpeg: Lists files ending in either .jpg or .jpeg.
ls .jpg: Uses * to match both .jpg and .jpeg.

Wrong:
ls *.png: Restricts results to .png files only.
ls 000?.jpg: Matches numbered .jpg files with a single character placeholder, not .jpeg.