08-31-2006
I don't know of a utility that does this offhand. netstat can tell you what ports are in use, but doesn't check a specific one...
In the time between checking it and opening it, something else could grab it anyway, so polling is never guaranteed to work. Why not just attempt to use it, and if it fails, record why?
10 More Discussions You Might Find Interesting
1. Cybersecurity
Hello every one.
I work in a LAN with many application server.
Each one use a different port.
What command permit to obtain the number of these port.
thanks (2 Replies)
Discussion started by: hoang
2 Replies
2. UNIX for Dummies Questions & Answers
I wish to know whether a particular port is free or not in my SUN solaris SPARC machine . I wish to use that particular port for one server software.
How do I know that. (2 Replies)
Discussion started by: Hitesh Shah
2 Replies
3. UNIX for Dummies Questions & Answers
Hi expert,
I wanted to know in which port my apache is running in solaris box
thanks
Shaan (1 Reply)
Discussion started by: shaan_dmp
1 Replies
4. UNIX for Dummies Questions & Answers
hi all
i want to connect a system,
how can i know the port number of a system. (2 Replies)
Discussion started by: tukuna82
2 Replies
5. Shell Programming and Scripting
Can someone please help me with this SHELL script?
I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1.
Here is a start but I have no clue how to... (3 Replies)
Discussion started by: I-1
3 Replies
6. UNIX for Dummies Questions & Answers
Hey everyone,
I need to write a script that will display the number of the argument before displaying the argument itself. Here's what I have so far:
for arg in "$@"
do
echo $#:$arg
done
This returns the sum of all arguments preceding the arguments themselves.
$(script) a b c
3:a... (1 Reply)
Discussion started by: unclepickle1
1 Replies
7. Shell Programming and Scripting
Hi I am new in shell,
I am trying to create a small script that can do exit if a script is executed when argument not 2
#!/bin/sh
if ; then
echo greater
exit 1;
elif ; then
echo less
exit 1;
fiit keeps returning me
whatever number of argument I... (1 Reply)
Discussion started by: peuceul
1 Replies
8. Shell Programming and Scripting
Hello
Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Discussion started by: aadityapatel198
6 Replies
9. Solaris
please find the below o/p for your reference
bash-3.00# fcinfo hba-port
HBA Port WWN: 21000024ff295a34
OS Device Name: /dev/cfg/c2
Manufacturer: QLogic Corp.
Model: 375-3356-02
Firmware Version: 05.03.02
FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies
10. Shell Programming and Scripting
Hi Experts,
I have been trying to work on a simple shell script that will just add the two argument passed to it. Here is what i tried :
#!/bin/bash
welcome(){
echo "Welcome to this Progg. which will accept two parameter"
}
main_logic(){
arg=$#
echo "Number of argument passed is... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
LEARN ABOUT DEBIAN
netstat-nat
netstat-nat(1) General Commands Manual netstat-nat(1)
NAME
netstat-nat - Show the natted connections on a linux iptable firewall
SYNOPSIS
netstat-nat [options]
DESCRIPTION
netstat-nat Displays NAT connections managed by netfilter/iptables which comes with the > 2.4.x linux kernels.
The program reads its information from '/proc/net/ip_conntrack' or '/proc/net/nf_conntrack', which is the temporary conntrack-storage of
netfilter.
OPTIONS
-h displays help
-n don't resolve IPs/portnumbers to host/portnames
-p <protocol>
display NAT connections with protocol selection (see /etc/protocols)
-s <source host>
display connections by source IP/hostname
-d <destination host>
display connections by destination IP/hostname
-S display SNAT connections
-D display DNAT connections
-L display only connections to NAT box self (doesn't show SNAT & DNAT)
-R display only connections routed through the NAT box (doesn't show SNAT & DNAT)
-x extended view of hostnames
-r <src|dst|src-port|dst-port|state>
sort connections
-o no output header
-N display NAT box connection information (only valid with SNAT & DNAT)
-v prints version
FILES
/proc/net/ip_conntrack or /proc/net/nf_conntrack
SEE ALSO
http://www.tweegy.nl/projects/netstat-nat/
http://www.netfilter.org/
AUTHOR
netstat-nat has been written by D.Wijsman danny@tweegy.nl
The manual page has been written by marceln@xs4all.nl
July 2002 netstat-nat(1)