A lot of file systems...

Various Linux Stuff
Post Reply
thockman
Site Admin
Posts: 104
Joined: Thu Dec 15, 2005 5:51 pm
Location: Kansas City
Contact:

A lot of file systems...

Post by thockman » Thu Jun 05, 2014 3:57 pm

So you have a linux box that has a ton of nested file systems and you need to know what sub directories are mounted or just a dir.
I created a quick alias that will display which is which.
Not sure if there is a command that will do this but I couldn't find one.

Code: Select all

alias ismnt=$'for i in $(find . -maxdepth 1 -type d | awk -F "/" \'{print $2}\' | grep -v "\."); do ism=$(df | grep $i); if [ ! "$ism" ]; then echo "Is dir=$i"; else echo "Is mount=$i"; fi; done' 2>/dev/null

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest