Unix File Search Engine
MediumImagine you're building a powerful search utility similar to grep in Unix-like systems. This utility needs to efficiently search for files within a specified directory (and its subdirectories) that match a given pattern. The pattern could be a simple string, a wildcard expression, or, for more advanced users, a regular expression. The search should be highly configurable, allowing users to specify whether the search is case-sensitive, whether to follow symbolic links, and whether to search only within file names, file content, or both. The design should be easily extensible to support new search algorithms, pattern types, and output formats.
This isn't just about finding files; it's about designing a robust, modular, and easily maintainable search engine that can be adapted to various use cases.
Requirements
Think like an Architect
Before revealing the requirements, imagine you're in the interview right now."How would you clarify the scope with your interviewer?"