The current directory contains the following files and subdirectories. Subdirectories are marked with a forward slash (/) at the end of their name. You can build this directory structure locally using this ZIP file1.

|-- .
|-- ..
|-- aa.txt
|-- abc.txt
|-- bb.txt
|-- cc.txt
|-- eEp
|-- fFq
|-- first/
|  |-- 12345
|  |-- abc.txt
|  |-- abcde
|  |-- data/
|  |  |-- one.txt
|  |  `-- two
|  `-- def.txt
|-- gG
|-- o/
|  |-- def.txt
|-- second/
|  `-- data/
|     |-- four.txt
|     `-- three
|-- simpletxt
|-- test0
|-- test1
|-- test10
|-- test11
|-- test12
|-- test2
|-- test3
|-- test4
|-- test5
|-- test6
|-- test7
|-- test8
|-- test9
|-- testa
|-- testb
`-- testc

Assignment

In each case, use a path name with filename expansion (globbing) to describe the following files in the shortest possible way. Hidden files are always excluded implicitly.

  1. all files in the current directory whose name starts with test

  2. all files in the current directory whose name starts with test followed by a single character

  3. all files in the current directory whose name starts with test followed by a single digit

  4. all files in the current directory whose name ends with p or q

  5. all files in the current directory with extension .txt

  6. all files in the current directory whose second character of the name is an uppercase letter

  7. all files in the current directory whose name has exactly 5 characters

  8. all files in the current directory whose name does not start with t or a

  9. all files in the directory first

  10. all files in the directory first with extension .txt

  11. all files below the current directory that are below a directory data

  12. all files with extension .txt that are below a subdirectory of a subdirectory of the current directory