[enhancement] New master command added (showspace)

newcommand
requested
enhancement

#1

showspace - shows the amount of disk usage of all users on the server.

Update


The command has been updated for future use as a standalone command, this is better in regards to removing the need to reboot servers. Additional adjustments were made to have the readout be a bit cleaner as well as not forcing the operator to the /home directory (it just reads it now).

Official Up-To-Date Patch Method

This patch can be downloaded and applied to current installs via the following command:

cd /usr/local/bin/
sudo curl -O -s https://raw.githubusercontent.com/Swizards/QuickBox/qb_u_1604/commands/showspace
sudo chmod +x /usr/local/bin/showspace

The new output looks as follows:


Out-Dated Patch Method

If you ran the previous patch, please run the following once more and reboot.

curl -LO https://raw.githubusercontent.com/Swizards/QuickBox/qb_u_1604/commands/bashrc > ~/.bashrc
sudo mv ~/bashrc ~/.bashrc

previous example logged in as root:

[[email protected]]:(748.3kb)~# showspace
16K     lost+found/
24K     qbio/
1.4M    quickbox/
[[email protected]]:(7.0kb)/home#

:information_source: Heads Up!

A reboot of your server may be in order to process the new command.
(( This only applies to the past version and anyone that needs to repatch their .bashrc if the previous version was installed ))


Verification & Review

https://github.com/Swizards/QuickBox/blob/qb_u_1604/commands/showspace


#2

Time to test! installing fresh now!

Edit : Works like a charm :smiley:

[[email protected]]:(938.5kb)~# showspace
1.4M denellum/
[[email protected]]:(0b)/home#