Subject: Re: Proposal for new utility in base: bin/nc
To: Simon Burge <>
From: Andrew Brown <>
List: tech-userlevel
Date: 10/12/2001 01:46:28
>> nc (netcat) is one of the most useful tools around.  When
>> installing a new system, the first thing i always do is put an nc
>> binary on a floppy so i can mass-transfer other files onto the
>> system.
>Never used it...  You haven't described its functionality here, so I'm
>still not sure what it does.  ftp(1) is also a useful mass transfer
>program :-)

it's not so much a mass transfer program as a userlevel interface to a
random socket.  that's neat, but keep in mind that cat combined with a
small portal filesystem is almost as good.

>> Its usefulness more than justifies its
>> presence, IMHO.
>While I don't mean to sound too negative, I'm wondering what usefulness
>it provides over other tools already in the base system.

i can speak for having used it for random transfers of bulk data
between two machines like this:

	machine-a# nc -l -p 35325 > root.dump.gz
	(this then waits for a connection)

	machine-b# dump -0f - / | gzip | nc machine-a 35325
	(this connects and dumps the gzip'ed data over the net)

it's easier to use than setting up ftp (although i've used telnet and
nc instead of an ftp client to get files from an ftp server...some ftp
clients are just two dumb) and better than setting up the r* services.

the only thing that annoyed me about it was the lack of a man page,
which is why i wrote one for the nc pkg in pkgsrc.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."