Bird
0
0

Why might locate show files that no longer exist on the system?

hard📝 Conceptual Q10 of 15
Linux CLI - Searching and Finding
Why might locate show files that no longer exist on the system?
ABecause locate searches the live filesystem
BBecause the locate database is not updated after file deletion
CBecause locate caches deleted files temporarily
DBecause locate only shows files owned by the user
Step-by-Step Solution
Solution:
  1. Step 1: Understand locate database update

    Locate uses a database updated periodically, so deleted files remain until next update.
  2. Step 2: Check other options

    Locate does not search live filesystem or cache deleted files; ownership does not affect listing.
  3. Final Answer:

    Because the locate database is not updated after file deletion -> Option B
  4. Quick Check:

    Outdated database causes stale results = A [OK]
Quick Trick: Run updatedb regularly to avoid stale locate results [OK]
Common Mistakes:
  • Thinking locate searches live files
  • Assuming locate caches deleted files
  • Believing ownership limits results

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes