PracHub
QuestionsCoachesLearningGuidesInterview Prep
|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)
|Home/Software Engineering Fundamentals/Intuit

Find largest file in a directory using Bash

Intuit logo
Intuit
Feb 11, 2026, 12:00 AM
mediumSoftware EngineerTake-home ProjectSoftware Engineering Fundamentals
5
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
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

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,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
  • AI Coding 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.