You haven't yet saved any bookmarks. To bookmark a post, just click .

  • Find the largest file recursively on Linux

  • Finding the largest file recursively on Linux is an easy task if you know how to use the find, du and other commands. The du command is used to estimate file space usage on Linux system. The output of du is then passed on to the sort and head command using shell pipes. Below, you will see how to find the largest file on your Linux machine.

    List Largest File Using Find

    1. Log in as root
    2. Issue the following command: du -a /dir/ | sort -n -r | head -n 20

    The du command above will estimate the file space usage and sort will sort the output of the file space usage.