Code Monkey home page Code Monkey logo

disk_free_frankie's Introduction

disk_free_frankie

Calls to df and trims the output cleaning uuid and mapper from device

SYNOPSIS

With LVM and uuid devices, using df can be a pain:

    $ df
    Filesystem                                             1K-blocks     Used 
        Available Use% Mounted on
    rootfs                                                   3842376  1493404
        2153784  41% /
    udev                                                       10240        0
        10240   0% /dev
    tmpfs                                                     103384      204
        103180   1% /run
    /dev/disk/by-uuid/6832e4f5-a260-4f25-b376-7d7175bce2a9   3842376  1493404
        2153784  41% /

dff just calls df and trims the device part to make the output 
human readable again.

    $ dff.pl
    Filesystem    1K-blocks      Used  Available  Use% Mounted on
    rootfs          3842376   1493404    2153784   41% /
    udev              10240         0      10240    0% /dev
    tmpfs            103384       204     103180    1% /run
    uuid/6832e4f    3842376   1493404    2153784   41% /

REQUIREMENTS

IPC::Run Perl Module.

Debians: 

$ sudo apt-get install libipc-run-perl

RPMs:

#yum install perl-IPC-Run.noarch

INSTALLATION

Copy the file dff.pl to some directory in your path:

$ sudo cp dff.pl /usr/local/bin

USAGE

Use it the same way you used df. It actually calls df, then it trims
the device part:

    $ dff.pl [ARGS]

If it runs well for you, use it from an alias, ie: .bashrc

    alias df=dff.pl

Even cleaner output:

    alias df=dff.pl -hP

dff own arguments

    If you use it as an alias, maybe one day you will need the real thing:
    
    $ dff.pl --real
    $ df --real # if you aliased df

    You can also change the length of the device part:

    alias df=dff.pl --length=19

LICENSE

(c) 2013 Francesc Guasch Ortiz

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

disk_free_frankie's People

Contributors

frankiejol avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.