PDF download Download Article
Use find, du, or a graphical app to discover your biggest files
PDF download Download Article

If you want to know which files on your Linux system are taking up the most space, you have several options, including both command-line and GUI tools. This wikiHow article will teach you the best ways to find large files on Linux.

Things You Should Know

  • To find large files on Linux, use this command: sudo du -aBm / 2>/dev/null | sort -nr | head -n 10
  • To find the largest files in a directory, use: du -ah /directory/name | sort -rn | head -n 10
  • To find all files over 500 MB, use: sudo find / -type f -size +500M -ls
Section 1 of 4:

Using the du Command

PDF download Download Article
  1. To see the top 10 largest files and their sizes in a directory, use du -ah /directory/name .
    • To find the largest files in the current directory, omit the directory name from the command.
    • You can replace -10 after head -n with your preferred number of large files to display.
  2. To see the ten largest files on your Linux system, use sudo du -aBm / 2>/dev/null .
    • Because you're finding the largest files in all directories, you'll need to use the sudo command to get root privileges .
    • This command can take a long time to run, as it needs to search all files on the system.
  3. Advertisement
Section 2 of 4:

Using the find Command

PDF download Download Article
  1. To find the 10 largest files in a directory, use find /directory/name -type f -exec ls -sh {} \; .
    • This command displays the ten largest files in the current directory and their sizes, with the largest file at the top of the list. You can replace 10 with your preferred number of files, such as 20 to see the 20 largest files.
    • To find the largest files in the current directory, omit the directory name or replace it with . .
  2. To find all large files above 500 MB in a directory, use find /directory/name -type f -size +500M .
    • Replace 500M with your preferred file size.
    • To search the current directory, replace the directory name with . .
  3. To find all files above a certain size on the entire filesystem, use sudo find / -type f -size +500M -ls . In this command, only files larger than 500 MB will appear in the results, along with their size, owner, and permissions.
  4. Advertisement
Section 4 of 4:

Using GUI Apps

PDF download Download Article
  1. This KDE app, which is available from Ubuntu Software (or use sudo apt install filelight at the prompt), makes it easy to find large files in Linux. It also displays the large files as a nice visual so you can get an idea of how your storage is being used. [1]
  2. Another great GUI tool that will help you find and visualize large files on Linux is QDirStat, which you can install using the command sudo apt install qdirstat (Debian, Linux Mint, and Ubuntu) or sudo dnf install qdirstat (Fedora and Redhat). Once installed, select any directory, including the root directory, to find large files.
  3. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Video

      Tips

      • You can also use ncdu , a disk usage analyzer meant for finding large files on remote servers. Install it with sudo apt install ncdu , or get it from your distro's package manager. [2]
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about linux, check out our in-depth interview with Michael Thompson-Brown .

      About This Article

      Thanks to all authors for creating a page that has been read 10,366 times.

      Is this article up to date?

      Advertisement