Articles in this section

How to find the largest files/directories on the Plesk server

kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux

Question

How to find directories/files that take up the most disk space on the Plesk server?

How to find the largest files/directories on the Plesk server?

Answer

Plesk interface

 

The Diskspace Usage Viewer extension can show what directories and files consume disk space.

  1. Log in to Plesk.
  2. Go to Extensions and install Diskspace Usage Viewer.
  3. Open the extension:
    • On the Diskspace Usage tab, find all directories/files and their disk usage. Click on directories to see files inside.


      Screenshot_2019-06-12_Diskspace_Usage_Viewer_-_Plesk_Onyx_17_8_11_1_.png
       

    • On the Largest Files tab, find the largest files.
Command-line interface

 

Use the find utility to find large files that consume the disk space:

  1. Connect to your Plesk server via SSH.
  2. Run the following command to find all files with the size larger than 20 MB and modified for the last 24 hours:

    # find / -mtime 0 -type f -size +20M -exec du -h {} + 2>/dev/null | sort -r -h

    To find all files larger than 200 MB:

    # find / -type f -size +200M -exec du -h {} + 2>/dev/null | sort -r -h

 

Use the du utility to find what locations consume the disk space:

  1. Connect to your Plesk server via SSH.
  2. Run the following command to find the disk usage in a specific location:

    # du -hd 1 /
    11G /var
    <...>
    8.9M /bin
    1008M /opt
    15G /

Was this article helpful?

Comments

1 comment
Date Votes
  • Is it possible for Reseller accounts to have access to this extension? I did not find a way to share it.

    It would be nice to have something similar to view folder sizes for mailboxes available to Plesk users not just admins.

    0

Please sign in to leave a comment.