Admin-Ahead Community

Linux => General Linux => Topic started by: Amal John Ronkha on July 14, 2018, 11:34:34 am

Title: A simple bash script line to find the most Inode using directory
Post by: Amal John Ronkha on July 14, 2018, 11:34:34 am
Indoe usage has always been an issue for both the developers and system admins.  :-X

Here is a simple bash script line to find most inode using directories on your server  8)

Code: [Select]
CPWD=$(pwd);cd /;read -p "Enter number of records to display: " rn;printf "\nPlease wait.. This may take some time.. \n\n";du --inodes -xS | sort -n -r | printf "\nINODES\tDIRECTORY\n\n`head -n $rn`\n";cd $CPWD;printf "\n\nListing done..\n";
Just paste this line into the terminal and enter numbers of records you need to see and that's it!  ;)

Hope this helps!