Find the answer to your Linux question:
Results 1 to 4 of 4
Hi All How to create a shell script on centos 5. which tells whether the particula port is busy or not. It will take input port number like 80 ,25 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    15

    shell script to check port is busy


    Hi All

    How to create a shell script on centos 5. which tells whether the particula port is busy or not.

    It will take input port number like 80 ,25 etc and will tell whetehr it is free or busy.

    I would like to use this script in below manner
    SHELL>checkPort.sh 80
    SHELL>busy or free it returns.


    what is good a c/c++ socket program to check port busy or not, Or shell script for the same?


    Thanks
    Ritesh

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    Depending on what you mean by "busy", netstat might be what you want.

  3. #3
    Just Joined!
    Join Date
    Aug 2012
    Posts
    4
    what in case is i need to do "netstat" on remote server..
    Thanks in Advance

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,383
    Locking this old thread.

    Feel free to start your own, though.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •