PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Software Engineering Fundamentals/Intuit

Find largest file in a directory using Bash

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's proficiency with shell scripting and Unix command-line concepts, including recursive file-system traversal, recognizing regular files versus other file types, handling filenames with whitespace, and extracting size metadata.

  • medium
  • Intuit
  • Software Engineering Fundamentals
  • Software Engineer

Find largest file in a directory using Bash

Company: Intuit

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Take-home Project

Write a Bash command (or short script) that, given a directory path, returns the **largest regular file** under that directory. Requirements: - Search **recursively** under the directory. - Output the file path (and ideally the size as well). - Handle file names that may contain spaces. Example: - Input: `/var/log` - Output: something like `1234567 /var/log/biggest.log`

Quick Answer: This question evaluates a candidate's proficiency with shell scripting and Unix command-line concepts, including recursive file-system traversal, recognizing regular files versus other file types, handling filenames with whitespace, and extracting size metadata.

Related Interview Questions

  • Format VARCHAR amounts into $ with M/B suffix - Intuit (medium)
  • Aggregate transactions by status and failure reasons (SQL) - Intuit (medium)
Intuit logo
Intuit
Feb 11, 2026, 12:00 AM
Software Engineer
Take-home Project
Software Engineering Fundamentals
3
0
Loading...

Write a Bash command (or short script) that, given a directory path, returns the largest regular file under that directory.

Requirements:

  • Search recursively under the directory.
  • Output the file path (and ideally the size as well).
  • Handle file names that may contain spaces.

Example:

  • Input: /var/log
  • Output: something like 1234567 /var/log/biggest.log

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Intuit•More Software Engineer•Intuit Software Engineer•Intuit Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.