Single Server
1
|
lspath | awk '{print $1,$NF}' | sort | uniq -c |
(OR)
1
2
3
4
5
|
for x in `lspath | awk '{print $2}' | sort -k1.6n | uniq ` do status=`lspath -l $x` echo $status | sed 's/\ /,/g' done |
Multiple Server
1
2
3
4
|
for i in ` cat server` do ssh $i lspath | awk '{print $1,$NF}' | sort | uniq -c | awk - v MYHOST=$( ssh $i uname -n) '{print MYHOST " " $1,$2,$3}' done |
Article Number: 263
Posted: Tue, Jun 12, 2018 9:05 AM
Last Updated: Tue, Jun 12, 2018 9:05 AM
Online URL: http://kb.ictbanking.net/article.php?id=263