We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.16.3. Disk space analysis

Byconnecting to hosting via SSH, you can conduct a detailed analysis disk space using the commands below.

In commands:

  • To search not across the entire hosting account, but within a specific directory, specify the path to this directory instead of ~.
  • Instead 5 you can specify the number of files / directories to show in the results.

To view the five largest catalogs run the command:

du -smh ~/* | sort -rh | head -n 5

To view the five largest directories, including subdirectories, run the command:

du -Sh ~ | sort -rh | head -n 5

To view the five largest files and largest subdirectories in a given directory run the command:

du -sh ~/way/to/catalog/* | sort -rh | head -n 5

To view five largest files run the command:

find ~ -type f -exec du -Sh {} + | sort -rh | head -n 5

To view the five subdirectories of the current directory that take up the most inodes, run the command:

find . -xdev | cut -d "/" -f 2 | sort | uniq -c | sort -nr | head -n 5

To view five directories occupying the most inodes, including subdirectories, run the command:

find . -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -nr | head -n 5

To view the number of inodes occupied by the contents of the current directory (including subdirectories), run the command:

find . | wc -l