โ† All 010-160 Flashcard Decks

Searching and Extracting Data Flashcards

7 cards from real 010-160 practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Searching and Extracting Data flashcards as text
  1. Which find option is used to search by file modification time within the last 2 days?

    Answer: find . -mtime -2

    find -mtime -2 finds files whose modification time is less than 2 days ago.

  2. What does the `tr 'a-z' 'A-Z'` command do?

    Answer: Translates lowercase letters to uppercase

    tr translates characters; 'a-z' to 'A-Z' converts every lowercase letter to its uppercase equivalent.

  3. Which grep option prints the line number before each matching line?

    Answer: -n

    grep -n prefixes each matching line with its line number in the file.

  4. What does `uniq` do by default when given sorted input?

    Answer: Removes consecutive duplicate lines

    uniq removes consecutive duplicate lines, so input should be sorted first to eliminate all duplicates.

  5. Which command searches for files larger than 100MB?

    Answer: find . -size +100M

    find -size +100M finds files whose size exceeds 100 megabytes.

  6. How do you use grep to search recursively through all files in a directory?

    Answer: grep -r pattern dir/

    grep -r (or --recursive) searches through all files in the directory and its subdirectories.

  7. What does `tail -f /var/log/syslog` do?

    Answer: Follows the file and prints new lines as they are written

    tail -f follows a file in real time, printing new content as it is appended.