Month: November 2015

Disk usage by file type

Trying to find the total usage for each of the file types by extension, then here is a quick bash function for you :

disk_usage_type () 
{ 
    find . -name '*'$1 -ls | awk '
    BEGIN{
        a[0]="Bytes";
        a[1]="KB";
        a[2]="MB";
        a[3]="GB";
    }
    {sum+=$7; files++;}
    END{
    print "Total sum is ::\t" sum;
    print "Total files  ::\t" files;
        while (sum > 1024) {
            sum=sum/1024;
            count++;
            };
        print sum" "a[count];
    }'
}

Just define the function in one of your bash startup files. After that to use the function pass in the extension for which you would like to find the total size. Output should be something like below:

Total sum is ::    2586694320
Total files  ::    149
2.40905 GB

 

terminal, terminal everywhere.

Tilda is a borderless terminal that can be started multiple times each with its own configuration.

Name        : tilda
Arch        : x86_64
Epoch       : 0
Version     : 1.2.4
Release     : 1.fc23
Size        : 344 k
Repo        : @System
From repo   : fedora
Summary     : A Gtk based drop down terminal for Linux and Unix
URL         : http://github.com/lanoxx/tilda
License     : GPLv2+
Description : Tilda is a Linux terminal taking after the likeness of many classic terminals
: from first person shooter games, Quake, Doom and Half-Life (to name a few),
: where the terminal has no border and is hidden from the desktop until a key is
: pressed.

 

Its super easy to have multiple configurations. Start as many as you want. Preferences dialog automaticallly pops up when you start first time and then just configure the terminal to your needs.