Ch7 Text Utilities Exam

  1. If you want to see the entire contents of a text file, you can use the _____ command:

    • wc
    • cat
    • type
    • cut
  2. The head -n -1 readme.txt command will:

    • Display all but the first line of readme.txt
    • Display the first line of readme.txt
    • Display all but the last line of readme.txt
    • Number the first line of readme.txt
  3. Which command will merge two files together line by line?

    • join
    • paste
    • combo
    • merge
  4. Which of the following is a non-interactive editor?

    • ed
    • nano
    • vi
    • sed
  5. If you want to break apart a large file into smaller files, you can use:

    • cat
    • split
    • break
    • dump
  6. If you want to extract fields from a file, you can use:

    • cols
    • field
    • split
    • cut
  7. Select the function that the tr command cannot perform:

    • Eliminate duplicate characters
    • Delete specific characters
    • Translate from one set of characters to another
    • Insert characters
  8. Which command will remove consecutive duplicate lines from a file?

    • uniq
    • tr
    • dedup
    • sed
  9. This command displays binary files in a variety of representations:

    • od
    • cat
    • cut
    • format
  10. If you want a file to be displayed with its lines numbered, you can use:

    • fmt
    • nl
    • cut
    • nc
  11. To put the lines of a file in alphabetical order, you can run:

    • uniq
    • paste
    • cat
    • sort
  12. Which of the following commands can be used to scroll through a text file?

    • less
    • cat
    • head
    • sed
  13. Which option of the head command will display only the first six lines of a file?

    (choose two)

    • -6
    • -n 6
    • -n
    • -n -6
  14. The _____ command will tell you if a command exists as a built-in command, function, alias or a command located within the PATH variable.

    • type
    • export
    • set
    • declare
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments