Skip to content

geeksteam/DiskAnalyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disk usage analyzer

A module and command line utility for getting info about disk usage.

Usage instructions

Build a main application's entrance point:

go build danalyz.go

Run danalyz binary. In some cases it has to be executed with root privileges.

Required flags:

  • path - Path to directory to work with.
  • big-dirs - Big directories mode. Returns all subdirectories of given directory, which size is bigger than given max size (max-size flag, gigabytes). Either this flag or dir_struct flag has to be present.
  • dir-struct - File structure mode. Returns hierarchical representation of given directory with given depth (depth flag), as well internal files sizes (megabytes). Either this flag or big_dirs flag has to be present.

Optional flags:

  • depth - Depth of walk for File structure mode. (default 3)
  • max-size - Files with size bigger than this value are considered as large files. (default 1000)

Examples

Get subdirectories of /path/to/my/folder bigger than 500gb:

danalyz -path="/path/to/my/folder" -big-dirs -max-size=500

Get hierarchical structure of all subdirectories of /path/to/my/folder with max depth of 10:

danalyz -path="/home/max" -dir-struct -depth=10

About

Analyze disk usage and return result in JSON.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages