Giter Site home page Giter Site logo

cloudxtreme / inodes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sinesiobittencourt/check-inodes

0.0 2.0 0.0 160 KB

Bash/Shell script to count inode usage

Home Page: http://smyl.es/generating-inode-report-for-linux-ubuntu-centos-etc-with-inodes-shellbash-script/

Shell 100.00%

inodes's Introduction

inodes

inodes

is a Shell/Bash script to count and display directory inode (each file) usage, and size.

Features Include:

  • Output full directory report
  • Filter out directories based on inode size
  • Include tree view of directories based on inode size

Upcoming Features:

  • Cleaner UI output
  • Update check (maybe)
  • New shorthand arg (ie "-et 1000" same as "-e 1000 -t 1000")
  • Output report to HTML file
  • Enhanced tree view to support extended depth (in dev)
  • Watch argument to add cronjob and notify by email
Got an idea?

Tree display will allow you show sub-directories in the output that have over a specific number of inodes. So if you want a directory with over 50,000 inodes to display the sub-directories in a tree format, use the -t argument.

Exclude will allow you to exclude directories that are below a specific amount of inodes, therefore creating a smaller output/report.

Installation

wget -O ~/bin/inodes https://raw.smyl.es/inodes/master/inodes
chmod +x ~/bin/inodes

Usage

Directory path is not required. If nothing is provided the present working directory is used.

Argument Example Description
-d inodes -d /path/to/dir Specify path to directory to scan. Optional, will use pwd if not specified.
-t inodes -t 50000 Display tree output for directories with over 50,000 inodes. Optional.
-e inodes -e 100 Exclude directories that are below 100 inodes. Optional

Examples

Output inode report for /my/dir showing tree output for sub-directories on directories over 50000 inodes

inodes -d /my/dir -t 50000

Output inode report for /my/dir showing tree output for sub-directories on directories over 50000 inodes, excluding directories with under 10,000 inodes.

inodes -d /my/dir -t 50000 -e 10000

Output inode report for present working directory without any exclusion or tree output

inodes

Troubleshooting

If you get a "inodes: command not found" you need to set the correct path. In installation above we installed into ~/bin/inodes

Check path with this command and make sure the file is in one of those directories:

echo ${PATH}

If not you can export path to your .bashrc file

PATH=~/bin:"${PATH}"
export PATH

And verify

which inodes

inodes's People

Contributors

tripflex avatar

Watchers

 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.