https://github.com/tripflex/inodes
Bash/Shell script to count inode usage
https://github.com/tripflex/inodes
Last synced: about 1 year ago
JSON representation
Bash/Shell script to count inode usage
- Host: GitHub
- URL: https://github.com/tripflex/inodes
- Owner: tripflex
- Created: 2013-05-15T04:23:53.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2016-12-28T18:15:37.000Z (over 9 years ago)
- Last Synced: 2024-04-14T18:06:27.492Z (about 2 years ago)
- Language: Shell
- Homepage: http://smyl.es/generating-inode-report-for-linux-ubuntu-centos-etc-with-inodes-shellbash-script/
- Size: 7.81 KB
- Stars: 85
- Watchers: 8
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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
``` bash
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
``` bash
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.
``` bash
inodes -d /my/dir -t 50000 -e 10000
```
Output inode report for present working directory without any exclusion or tree output
``` bash
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:
``` bash
echo ${PATH}
```
If not you can export path to your .bashrc file
``` bash
PATH=~/bin:"${PATH}"
export PATH
```
And verify
``` bash
which inodes
```
