Pull to refresh

В тестовой сборке Windows 10 появилась утилита Disk Usage — анализатор дискового пространства из командной строки

Reading time 3 min
Views 5.8K


По информации портала Bleeping Computer, Microsoft без официального представления начала тестировать новое встроенное приложение для Windows 10. Утилиту под названием DiskUsage пользователи обнаружили в вышедших на прошлой неделе сборках Windows 10 Insider build 20277 и build 21277. Это встроенный в систему анализатор дискового пространства из командной строки.

Фактически, новая утилита DiskUsage является расширенной версией DU (Disk Usage) от Марка Руссиновича.

Инструкция по использованию утилиты DiskUsage.
DiskUsage - Disk Usage

Description: Summarize disk usage recursively for the given directory.
Usage      : diskusage [Options] [Directory]
Options    :
    /a, /systemAndReserve    displays size for system files and reserved space
    /c, /csv                 displays in csv format
    /d, /maxDepth=N          displays directory information only if it is N or
                             fewer levels below command line argument
    /e, /minFileSize=SIZE    displays directory information only if its FileSize
                             is greater or equal than SIZE
    /f, /minSizeOnDisk=SIZE  displays directory information only if its SizeOnDisk
                             is greater or equal than SIZE
    /g, /displayFlag=FLAG    specifies the flags value to determin which column(s) to display
                             column          value    description
                             SizeOnDisk      0x001    the on disk size
                             FileSize        0x002    the end of file size
                             SizePerDir      0x004    sum of SizeOnDisk for top level child
                             Files           0x008    number of child files
                             ChildDirs       0x010    number of child directories
                             FilesPerDir     0x020    number of top level child files
                             DirsPerDir      0x040    number of top level child directories
                             CreationTime    0x080    file creation timestamp
                             LastAccessTime  0x100    file last access timestamp
                             LastWriteTime   0x200    file last write timestamp
                             Attributes      0x400    file attributes
    /h, /humanReadable       displays size in human readable format
    /i, /iniFile=FILE        takes all the parameters from an INI file.
                             NOTE: SCENARIO name must be speificed via /j (/scenario)
    /j, /secnario=SCENARIO   specifies the scenario name for the INI file
    /l, /allLinks            count all hardlinks separately (By default, files with multiple
                             hardlinks are counted only once towards the first link name)
    /m, /multipleName        count only files with more than one link names
    /n, /nameFilter=FILTER   count only files whose name matches the name filter
    /p, /preferredPath=PATH  count files with multiple link names towards the first link that is
                             under PATH if it exists
                             NOTE: This options must not be specified togerther  with /l (/allLinks)
    /q, /virtual             recurse into virtual directories
    /r, /skipReparse         skip recursing into reparse directories
    /s, /skipResurse         skip recursing into child directories when calculating sizes
    /t, /TopDirectory=N      displays Top N directories by SizeOnDisk in descending order
    /u, /TopFile=N           displays Top N files by SizeOnDisk in descending order
    /v, /verbose             displays verbose error information
    /x, /clearDefault        do not display the default selected columns


Утилита еще находится в начальной стадии разработки. Сейчас некоторые ее функции работают не так, как заявлено, также присутствуют орфографические ошибки в ее описании.

Эксперты Bleeping Computer изучили возможности утилиты Disk Usage. Для запуска утилиты необходимы административные привилегии.

По умолчанию при запуске DiskUsage размер файлов и папок отображается в байтах, что не так удобно, как отображение размеров в МБ и ГБ. Microsoft добавила в утилиту опцию /h (humanReadable) для отображения удобочитаемых размеров файлов и папок для пользователей.


Пример поиска с помощью DiskUsage в директории «C:\Windows» папок, размер которых превышает 1 ГБ. Для этого была использована команда:
diskusage /minFileSize=1073741824 /h c:\windows

В инструкции DiskUsage заявлено, что можно вывести список, ограничив его количество, самых больших папок на диске или в указанной папке. Для этого нужно использовать опцию /t (TopDirectory=N).


Пример поиска с помощью DiskUsage в директории «C:\Windows» 5 папок, размер которых самый большой. Для этого была использована команда:
diskusage /t=5 /h c:\windows

К сожалению, результат этой команды оказался не таким, как ожидалось. В итоге был показан отсортированный список из 5 папок, но, судя по первому поиску в этой папке, утилитой были выведены на экран строки не с теми папками, которые ожидались. Скорее всего, приведенная выше команда работает корректно, но она отображает самые большие папки без учета файлов в их подпапках.

DiskUsage также можно использовать для поиска файлов с наибольшими размерами. Для это нужно использовать опцию /u (/TopFile=N).


Пример поиска с помощью DiskUsage в директории «C:\Windows» 5 самых больших файлов. Для этого была использована команда:
diskusage /u=5 /h c:\windows

Также в DiskUsage можно сделать настройку вывода данных в csv, там есть возможность пропускать различные типы папок, анализировать папки и файлы по timestamp.

Microsoft на данный момент не предоставила информацию, когда утилита DiskUsage будет доступна всем пользователям.

См. также:

Tags:
Hubs:
If this publication inspired you and you want to support the author, do not hesitate to click on the button
+9
Comments 40
Comments Comments 40

Other news