1

I followed this guide to migrate my amazon image from one zone to another. Everything goes fine, but when i run this command:

netcat -p 9999 -l >/dev/sdf

It shows that the command is not found. Then i tried to use nc instead:

nc -p 9999 -l >/dev/sdf

It seems that nc cannot be run with the combination of -p and -l option. What is the exactly same command i should run on my system in equivalent to "netcat -p 9999 -l >/dev/sdf" ?

i am using "Basic 32-bit Amazon Linux AMI 2011.02.1 Beta" as my primary image. It seems that it's centos based. Any help would be much appreciated.

1

1 Answer 1

3

Some nc versions has -p option with different meaning:

-p source_port
             Specifies the source port nc should use, subject to privilege restrictions and availability.  It is
             an error to use this option in conjunction with the -l option.

while another:

-p port      local port number (port numbers can be individual or ranges: lo-hi [inclusive])

In your case, just use nc -l 9999 > /dev/sdf is enough.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .