Linux Find the largest files and directories in Linux

Find the largest files and directories in Linux

Find The Largest Files And Directories In Linux

Here is a handy little list of command lines for Linux to find out which files and directories take up the most space, just to clean up. So, find the largest files and directories in linux with these commands.

Replace / home / manu with the directory of your choice. Don’t worry afterwards if it takes a little while.

There are other command I found out after searching a while. These are:

Find Command to find the largest files and directories

o search for files with size greater than 50 MB, in the current working directory , you would run the following command:

As output, this command will show a list of files without any additional information. Though path will be mentioned.

We can also use find command in combination with the the tools/command like ls or sort to perform operations on those files.

In the example below, we are going to pass the output of the find command to ls that will print the size of each found file and then pipe that output to the sort command to sort it based on the 5th column which is the file size.

The output will look something like this:

If the output contains a lot of lines of information you can use the head command to print only the first 10 lines:

Have a look at these too:

Leave a Reply