List of the largest files and folders in linux

salimzadeh

Ali Reza

Posted on July 27, 2024

List of the largest files and folders in linux

To get the list of the largest files and folders, we use several commands together :

Commands:

  • du: The 'du' command in Linux is used to estimate file and directory space usage.
  • pipeline( | ): The Pipe is a command in Linux that lets you use two or more commands such that output of one command serves as input to the next.
  • grep: Grep is a useful command to search for matching patterns in a file.
  • sort: SORT command is used to sort a file, arranging the records in a particular order.
  • head: The 'head' command in Linux is used to display the first part of files

Now use this command together:

du -ah / | grep -v "/$" | sort -rh | head -10

💖 💪 🙅 🚩
salimzadeh
Ali Reza

Posted on July 27, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related