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.



Comments

Popular posts from this blog

Python & Shell Scripting Real Time Course Book & Videos

Top Five Devops Technical Interview QA Books

Linux-Command Hands-On (DF)