DEVOPS-PRACTICAL-PROBLEM-4
Practical Problem: Suppose you got the list of servers for which you need to determine all the block devices in a minute. How will you overcome with this problem ?
Solution:
#!/bin/bash
for i in $(cat hostname.txt)
do
ssh -t $i "lsblk"
done
i variable is use to store hostname and lsblk is a linux command which is used to determine all the block devices.
If you want to expertise yourself in solving real time IT problems Please purchase below books where you will get around 500+ problems.
a. DEVOPS: https://www.amazon.in/dp/B07NBMY8J6
Comments
Post a Comment