Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ubuntu port ping

# Use the below command in your terminal
# No requirments are needed
(echo >/dev/tcp/{host}/{port}) &>/dev/null && echo "open" || echo "close"

# An example below
(echo >/dev/tcp/10.20.20.21/27017) &>/dev/null && echo "open" || echo "close"

# if open then it will return "open"
# if closed then it will return "close"
# if you can't connect to it then it will freeze, use ctrl+c
Comment

PREVIOUS NEXT
Code Example
Shell :: ionic capacitor motion 
Shell :: git stash example 
Shell :: yum clean all 
Shell :: can not ping github 
Shell :: active ssh users in ubuntu 
Shell :: conda install cairo 
Shell :: bash for i in range 
Shell :: Conditional variables in gitlab-ci.yml 
Shell :: not null check in powershell variable 
Shell :: bash get environment variable 
Shell :: how to check what module pip has already install 
Shell :: distutils.sysconfig install 
Shell :: vlc doesnt open after install ubuntu 
Shell :: how to add git bash to context menu 
Shell :: grep binary files 
Shell :: delete a github repository using bash 
Shell :: log cpu usage on linux 
Shell :: check who is logged in to system linux 
Shell :: vscode Error: EACCES: permission denied 
Shell :: kill cron proccess ubuntu terminal 
Shell :: run .bin file command linux 
Shell :: docker image tar import 
Shell :: batch color 
Shell :: apt-get ana-conda 
Shell :: cordova android generate keystore 
Shell :: sudo passwd /Users/username 
Shell :: install geopandas in jupyter notebook 
Shell :: gitlab server certificate verification failed 
Shell :: git remove tag from remote 
Shell :: brew check installed packages version 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =