Check to see source server is available
Hi,
I am using following to copy file from one server to other in a script but before using this command i want to use another command to check whether source server is accissable or not. Command is running from destination server scp -p source:/home/msl/abc1.csv /home/destination_folder |
The easiest variant is:
Code:
ping -c 1 HOST | grep -q '1 received' |
That only checks the network stack is up, not whether scp will work. Do it in arrears like this
Code:
scp -p source:/home/msl/abc1.csv /home/destination_folder |
Thanks for your help
|
All times are GMT -5. The time now is 11:20 PM. |