Linux Tips

Some Good Alternate options To ‘du’ Command

SEOClerks

As you could already know, the “du” command is used to compute and summarize the file and listing house utilization in Unix-like techniques. In case you are a heavy consumer of du command, you can find this information fascinating! At present, I got here throughout 5 good alternate options to du command. There may very well be many, however these are those that I’m conscious of in the intervening time. If I got here throughout something in future, I’ll add it on this checklist. Additionally, if you recognize every other alternate options, please let me know within the remark part under. I’ll evaluate and add them within the checklist as nicely.

1. Ncdu

The Ncdu is the favored various to du command within the Linux neighborhood. The developer of Ncdu shouldn’t be glad with the efficiency of the du command, so he ended up creating his personal. Ncdu is easy, but quick disk utilization analyzer written utilizing C programming language with an ncurses interface to search out which directories or recordsdata are taking on extra space both on an area or distant techniques. We have already got revealed an in depth information about Ncdu. Test the next hyperlink if you’re to know extra about it.

2. Tin Summer season

The Tin Summer season is used to search out the construct artifacts which might be taking on disk house. It’s also an yet one more good various for du command.  Because of multi-threading, Tin-summer is considerably sooner than du command when calculating the dimensions of the large directories. In contrast to Du command, it reads file sizes, not disk utilization. Tin SUmmer is free, open supply instrument written utilizing Rust programming language.

The developer claims Tin Summer season is sweet various to du command, as a result of,

It’s sooner on bigger directories in comparison with du command,
It shows the disk utilization leads to human-readable format by default,
It makes use of regex to exclude recordsdata/directories,
Gives sorted and colorized output,
Extensible,
And extra.

Putting in Tin Summer season

To put in Tin Summer season, open your Terminal and run the next command:

$ curl -LSfs https://japaric.github.io/belief/set up.sh | sh -s — –git vmchale/tin-summer

Alternatively, you possibly can set up Tin Summer season utilizing Cargo bundle supervisor. Be sure to have put in Rust in your system as described within the following hyperlink.

After putting in Rust, run the next command to put in Tin Summer season:

$ cargo set up tin-summer

If both of the above talked about strategies doesn’t not work, obtain the newest binary from the releases web page and compile and set up it manually.

Utilization

To seek out the file sizes in a present working listing, use this command:

$ sn f
749 MB ./.rustup/toolchains
749 MB ./.rustup
147 MB ./.cargo/bin
147 MB ./.cargo
900 MB .

See? It shows a nicer enter in human-readable format by default. You needn’t to make use of any additional flags (like -h in du command) to get this consequence.

To seek out the file sizes in a selected listing, point out the precise path like under:

$ sn f

We will additionally type the checklist within the output as nicely. To show the sorted checklist of the highest 5 greatest directories, run:

$ sn type /house/sk/ -n5
749 MB /house/sk/.rustup
749 MB /house/sk/.rustup/toolchains
147 MB /house/sk/.cargo
147 MB /house/sk/.cargo/bin
2.6 MB /house/sk/mcelog
900 MB /house/sk/

On your info, the final consequence within the above output is the entire measurement of the largest directories within the given listing i.e /house/sk/. So, don’t marvel why you get six outcomes as an alternative of 5.

To go looking present listing for directories with construct artifacts:

Tin Summer season also can seek for directories containing artifacts that occupy a sure measurement of the disk house. Say for instance, to seek for directories containing artifacts that occupy greater than 100MB of disk house, run:

$ sn ar -t100M

Like already talked about, Tin Summer season is quicker on bigger directories, however it’s also slower on small ones. Nevertheless, the developer assures he’ll discover a strategy to repair this sooner or later releases!

To get assist, run:

$ sn –help

For extra particulars, verify the venture’s GitHub repository given on the finish of this information.

three. Mud

Mud (du+rust=mud) is extra intuitive model of du utility. It would give us an on the spot overview of which directories are occupying the disk house with out having to make use of head or type instructions. Like Tin Summer season, it additionally shows the dimensions of every listing in human-readable format by default. It’s free, open supply and written utilizing Rust programming language.

Putting in Mud

Because the mud utility is written in Rust, It may be put in utilizing “cargo” bundle supervisor like under.

$ cargo set up du-dust

Alternatively, you possibly can obtain the newest binary from the releases web page and set up it as proven under. As of penning this information, the newest model was zero.three.1.

$ wget https://github.com/bootandy/mud/releases/obtain/v0.three.1/dust-v0.three.1-x86_64-unknown-linux-gnu.tar.gz

Extract the obtain file:

$ tar -xvf dust-v0.three.1-x86_64-unknown-linux-gnu.tar.gz

Lastly, copy the executable file to your $PATH, for instance /usr/native/bin.

$ sudo mv mud /usr/native/bin/

Utilization

To seek out the entire file sizes within the present listing and its sub-directories, run:

$ mud

Pattern output:

dust 1

Discover the entire measurement of a listing utilizing Mud

We will additionally get the complete path of all directories utilizing -p flag.

$ mud -p

dust 2

To get the entire measurement of a number of directories, simply point out them with space-separated:

$ mud

Listed here are some extra examples.

Present the obvious measurement of the recordsdata:

$ mud -s

Present explicit variety of directories solely:

$ mud -n 10

Present three ranges of sub-directories within the present listing:

$ mud -d three

For assist, run:

$ mud -h

For extra particulars, refer the venture’s GitHub web page given on the finish.

four. Diskus

Diskus It’s a easy and quick various command line utility to du -shcommand. The diskus utility computes the entire file measurement of the present listing. It’s a parallelized model of du -sh or quite du -sh –bytes command. The developer of diskus utility claims that it’s about 9 occasions sooner in comparison with ‘du -sh’. Diskus is minimal, quick and open supply program written in Rust programming language.

Putting in diskus

The diskus utility is obtainable in AUR, so you possibly can set up it on Arch-based techniques utilizing any AUR helper packages, for instance Yay , as proven under.

$ yay -S diskus

On Ubuntu and its derivatives, obtain the newest diskus utility from the releases web page and set up it as proven under.

$ wget “https://github.com/sharkdp/diskus/releases/obtain/v0.three.1/diskus_0.three.1_amd64.deb”

$ sudo dpkg -i diskus_0.three.1_amd64.deb

Alternatively, you possibly can set up diskus utilizing Cargo bundle supervisor. Be sure to have put in Rust 1.29 or greater in your system as described within the hyperlink given above in “Putting in Tin Summer season” part.

After you have Rust in your system, run the next command to put in diskus:

$ cargo set up diskus

Utilization

Often, once I wish to verify the entire disk house utilized by a selected listing, I exploit the -sh flags with du command as proven under.

$ du -sh dir

Right here, -s flag signifies abstract.

Utilizing Diskus instrument, I discover the entire measurement of present working listing with command:

$ diskus
diskus in action

diskus in motion

I examined diskus to compute the entire measurement of various directories in my Arch Linux system. The velocity of computing the entire measurement of the listing is fairly spectacular! I need to admit that this utility is kind of sooner than ‘du -sh’. Please be aware that it might probably discover the dimensions of the present listing solely in the intervening time.

For getting assist, run:

$ diskus -h

For extra particulars about Diskus, refer the official GitHub web page (hyperlink on the finish).

Urged learn:

5. Duu

Duu, brief for Directory Usage Utility, is one other instrument to search out the disk utilization of given listing. It’s a cross-platform, so you should utilize it on Home windows, Mac OS and Linux working techniques. It’s written in Python programming language.

Putting in Duu

Be sure to have put in Python3. Python3 is obtainable within the default repositories of most Linux distributions, so the set up wouldn’t be an issue.

As soon as Python3 is put in, obtain the newest Duu model from the official releases web page.

$ wget https://github.com/jftuga/duu/releases/obtain/2.20/duu.py

Utilization

To seek out the disk house occupied by the present working listing, merely run:

$ python3 duu.py

Pattern output:

duu

Discover whole measurement of a listing utilizing duu

As you possibly can see within the above output, Duu utility will show a pleasant abstract of whole variety of recordsdata and directories and their whole measurement in bytes, KB and MB. It would additionally show the entire measurement of every merchandise.

To show the entire disk utilization of a selected listing, simply point out the complete path like under:

$ python3 duu.py /house/sk/Downloads/

For extra particulars, refer Duu github web page included on the finish.

And, that’s all for now. Hope this was helpful. You realize now 5 alternate options to du command. Personally, I choose Ncdu over all of them given on this information. Now could be your flip. Give them a attempt to tell us your ideas on these instruments within the remark part under.

Extra good stuffs to come back. Keep tuned!

Cheers!

Sources:

Thanks for stopping by!

Assist us that can assist you:

Have a Good day!!

Source link

Related Articles

Back to top button