For Single Server

for filesystem_name in `df -gt |grep -v Filesystem |grep -v proc |grep -v ":" |awk '{print $6}'`
do
echo $lpar_df_list: $filesystem_name
dir=$filesystem_name
while [ "$dir" != "/" ]; do ls -ald $dir; dir="$(dirname "$dir")"; done
echo " "
done

For Multiple Server (Only Filesystem)

for lpar_df_list in `cat server`
do
for filesystem_name in `ssh $lpar_df_list df -gt |grep -v Filesystem |grep -v proc |grep -v ":" |awk '{print $6}'`
do
echo $lpar_df_list: $filesystem_name
dir=$filesystem_name
while [ "$dir" != "/" ]; do ssh $lpar_df_list ls -ald $dir; dir="$(dirname "$dir")"; done
echo " "
done
done
Advertisements