Plesk

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

Question

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

Answer

 

Using the Diskspace Usage Viewer extension in Plesk

 

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.

    • On the Largest Files tab, find the largest files.

 

Via a command-line interface

 

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

  1. Connect to a 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 Linux du utility to find what locations consume disk space:

  1. Connect to a 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 /

 

Exit mobile version