Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: A simple bash script line to find the most Inode using directory  (Read 1076 times)

0 Members and 1 Guest are viewing this topic.

Amal John Ronkha

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
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!