Quick Answer: How to Find Large Files in Linux?
Contents

Linux find largest file in directory recursively using find

  • Open the terminal application.
  • Login as root user using the sudo -i command.
  • Type du -a /dir/ | sort -n -r. | head -n 20.
  • du will estimate file space usage.
  • sort will sort out the output of du command.
  • head will only show top 20 largest file in /dir/

How can I tell which files are taking up space Linux?

Find Largest Directories in Linux

  1. du command: Estimate file space usage.
  2. a : Displays all files and folders.
  3. sort command : Sort lines of text files.
  4. -n : Compare according to string numerical value.
  5. -r : Reverse the result of comparisons.
  6. head : Output the first part of files.
  7. -n : Print the first ‘n’ lines.

How do I find the top 10 largest files in Linux?

How to find out top 10 files and directories on Linux or Unix

  • du command : Estimate file space usage.
  • sort command : Sort lines of text files or given input data.
  • head command : Output the first part of files i.e. to display first 10 largest file.
  • find command : Search file.
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest