HomeLinuxAnalyze File System Disk Utilization in Linux

Analyze File System Disk Utilization in Linux


dutree is a free, open-source, quick command-line device for analyzing disk utilization, written within the Rust programming language, which is developed from the mix of durep (disk utilization reporter) and tree (record listing content material in tree-like format) command-line instruments. In consequence, dutree reviews disk utilization in a tree-like format.

dutree shows coloured output, relying on the values configured within the GNU LS_COLORS surroundings variable. This surroundings variable permits for setting the colours of information based mostly on their extension, permissions, and file kind.

dutree Options:

  • Present the file system tree.
  • Helps aggregating of small information.
  • Permits for evaluating totally different directories.
  • Helps excluding information or directories.

Learn how to Set up dutree in Linux Methods

To put in dutree in Linux distributions, you will need to have rust programming language put in in your system. For those who don’t have Rust put in, you should utilize the next curl command to put in it as proven.

$ sudo curl https://sh.rustup.rs -sSf | sh
Install Rust in Linux
Set up Rust on Linux

As soon as Rust is put in, you may run the next command to put in dutree in Linux distributions as proven.

$ cargo set up --git https://github.com/nachoparker/dutree.git
Install dutree in Linux
Set up dutree in Linux

After putting in dutree, it makes use of surroundings colours in line with the variable LS_COLORS, it has the identical colours ls –shade command that our distro has configured.

$ ls --color

The only means of working dutree is with out arguments, this manner it exhibits a filesystem tree.

$ dutree
Linux Filesystem Disk Usage
Linux Filesystem Disk Utilization

To show actual disk utilization as a substitute of file measurement, use the -u flag.

$ dutree -u 
Show Linux Disk Usage
Present Linux Disk Utilization

Present Directories in Depth

You possibly can present directories as much as a given depth (default 1), utilizing the -d flag. The command under will present directories as much as a depth of 3, underneath the present working listing.

For instance if the present working listing (~/), then show the dimensions of ~/*/*/* as proven within the following pattern screenshot.

$ dutree -d 3
Show Directories in Depth Disk Usage
Present Directories in Depth Disk Utilization

Exclude Recordsdata or Directories in Output

To exclude matching a file or listing identify, use the -x flag.

$ dutree -x CentOS-7.0-1406-x86_64-DVD.iso 
Show Disk Usage with Exclude Filename
Present Disk Utilization with Exclude Filename

You too can get a fast native overview by skipping directories, utilizing the -f choice, like so.

$ dutree -f
Quick Overview by Skipping Directories
Fast Overview by Skipping Directories

A full abstract/overview may be generated utilizing the -s flag as proven.

$ dutree -s
Linux Disk Usage Summary
Linux Disk Utilization Abstract

Mixture Small Recordsdata

It’s attainable to mixture information smaller than a sure measurement, default is 1M as proven.

$ dutree -a 
Aggregate Small Files
Mixture Small Recordsdata

Exclude Hidden Recordsdata

The -H swap permits for excluding hidden information within the output.

$ dutree -H

The -b choice is used to print sizes in bytes, as a substitute of kilobytes (default).

$ dutree -b

To show off colours, and solely show ASCII characters, use the -A flag like so.

$ dutree -A

You possibly can view the dutree assist message utilizing the -h choice.

$ dutree -h

Utilization: dutree [options]  [..]
 
Choices:
    -d, --depth [DEPTH] present directories as much as depth N (def 1)
    -a, --aggr [N[KMG]] mixture smaller than N B/KiB/MiB/GiB (def 1M)
    -s, --summary       equal to -da, or -d1 -a1M
    -u, --usage         report actual disk utilization as a substitute of file measurement
    -b, --bytes         print sizes in bytes
    -x, --exclude NAME  exclude matching information or directories
    -H, --no-hidden     exclude hidden information
    -A, --ascii         ASCII characters solely, no colours
    -h, --help          present assist
    -v, --version       print model quantity

dutree is a straightforward but highly effective command-line device to point out file measurement and analyze disk utilization in a tree-like format, on Linux methods. Use the remark type under to share your ideas or queries about it, with us.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments