As reported: Rubrik new grad loop (September 2025), round 1 with two interviewers: design and implement something similar to a Linux file system. The question is open-ended, with many clarifying questions, and comes in parts (four in this round); the last 10 minutes were for questions.
Design and implement an in-memory file system modelled on Linux. Start by agreeing on the operations with the interviewers, then build them part by part.
Clarifications (agree on these first)
- Which operations: e.g.
mkdir -p,ls, create/write/read files,rm,mv, absolute and relative paths with.and..,cd/current directory. - Whether files hold text content and whether permissions, sizes or links are in scope.
- Error behaviour (path not found, file vs directory conflicts).