Bird
0
0

Which command will recursively search for the word 'data' in the current directory and all subdirectories?

easy📝 Conceptual Q2 of 15
Linux CLI - Searching and Finding
Which command will recursively search for the word 'data' in the current directory and all subdirectories?
Agrep data *
Bgrep -v data .
Cgrep -i data .
Dgrep -r data .
Step-by-Step Solution
Solution:
  1. Step 1: Identify recursive search command

    The -r option enables recursive search through directories.
  2. Step 2: Match command to requirement

    grep -r data . searches for 'data' recursively starting from current directory ('.').
  3. Final Answer:

    grep -r data . -> Option D
  4. Quick Check:

    Recursive search command = D [OK]
Quick Trick: Use -r with grep and dot (.) for current folder recursive search [OK]
Common Mistakes:
  • Using * only searches current directory files
  • Using -i ignores case but not recursive
  • Using -v excludes matches, not recursive

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes