Introduction to Linux I Chapter 6 Exam

Introduction to Linux I Chapter 6 Exam Answer

  1. Question ID 456

    Which of the following is not used for globbing?

    • [
    • #
    • ?
    • *
  2. Question ID 460

    How many times can you use a * glob character in a pattern?

    • Two
    • No limit
    • Three
    • One
  3. Question ID 461

    The command echo a* will display:

    • All of the files in the current directory that begin with an “a” character.
    • Only the file named “a*”.
    • All of the files in any directory that begin with an “a” character.
    • All of the files in the current directory that begin with an “a” or “A” character.
  4. Question ID 462

    The command echo ???a will display:

    • All of the files in the current directory that have four characters in the file name.
    • All of the files in the current directory that have four characters in the file name with the last character¬†being an “a” character.
    • All of the files in the current directory that end with an “a” character.
    • Only a file named ???a
  5. Question ID 463

    Which of the following characters can be used to negate (indicate NOT matching the following characters), when placed as the first of a set of characters enclosed in square brackets [] ?

    (choose two)

    • ?
    • ^
    • ~
    • !
  6. Question ID 464

    The range defined inside of square brackets is based on the:

    • Standard text table
    • ASCII text table
    • Invalid question as ranges are not permitted
    • ANSI text table
  7. Question ID 465

    To view the ASCII text table in Linux, you can use the following command:

    • view ASCII
    • list ACSII
    • man ASCII
    • echo ASCII
  8. Question ID 466

    Within square brackets, (Example: [?]) the ? character means:

    • Match a ? character
    • Match zero or more of any ? characters
    • Exactly one character
    • Nothing, it has no meaning at all
  9. Question ID 467

    You can combine glob characters in a single pattern, for example: a??*[0-9].

    True or False?

    • True
    • False
  10. Question ID 469

    Which command will display more information about globbing?

    • echo globbing
    • man 7 globbing
    • man 7 glob
    • man -7 glob
  11. Question ID 470

    Which command performs globbing?

    • The ls command
    • The echo command
    • The bash command
    • The display command
  12. Question ID 471

    Which of the following will match files that have the string “hello” somewhere in the file name?

    • echo hello*hello
    • echo hello*
    • echo *hello*
    • echo *hello
  13. Question ID 472

    The glob pattern [a-d] would match:

    • A file name with a single character that is either an “a”, “-“, or “d”.
    • Nothing, this is an invalid glob pattern.
    • A file name with a single character that is either a “a”, “b”, “c”, or “d”.
    • All files
  14. Question ID 473

    The glob pattern [!abc]*

    • Nothing, this is an invalid glob pattern
    • All files that start with any character except “a”, “b” or “c”
    • All files
    • All files that start with either of the following characters: “!”, “a”, “b” or “c”.
  15. Question ID 894

    Which glob character matches “exactly one character”?

    • ?
    • *
    • .
    • [
  16. Question ID 895

    Which glob character matches “zero or more characters”?

    • .
    • ?
    • *
    • [
  17. Question ID 896

    Which two characters match “a single character from a set of specified characters”?

    • []
    • ..
    • **
    • ??
  18. Question ID 897

    Which two characters represent the empty string?

    • **
    • &&
    • ..
    • “”

Comments

comments