From owner-freebsd-questions@FreeBSD.ORG Mon Jul 23 16:47:04 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2854A1065672 for ; Mon, 23 Jul 2012 16:47:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id D6E498FC17 for ; Mon, 23 Jul 2012 16:47:03 +0000 (UTC) Received: from r56.edvax.de (port-92-195-22-218.dynamic.qsc.de [92.195.22.218]) by mx02.qsc.de (Postfix) with ESMTP id BEA6524528; Mon, 23 Jul 2012 18:47:02 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q6NGl14Y002507; Mon, 23 Jul 2012 18:47:01 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 23 Jul 2012 18:47:01 +0200 From: Polytropon To: lei yang Message-Id: <20120723184701.f21a4744.freebsd@edvax.de> In-Reply-To: References: <20120722182545.39d6b96c.freebsd@edvax.de> <20120723163604.6e795aa4.freebsd@edvax.de> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: help about free bsp version netcat to work it on ubuntu X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2012 16:47:04 -0000 On Mon, 23 Jul 2012 23:29:38 +0800, lei yang wrote: > Yes, the second version I post is using the source from you supplied, > then I compiled it, but it has no > "-U" flag like what I post, it seems a version different casued this. Yes. The version distributed by the ports collection is different from that one supplied with the base system of FreeBSD. To try _that_ version, you can download the source tarball and extract it; in the directory # wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/9.0-RELEASE/src.txz # tar xvf src.txz # cd cusr/src/ontrib/netcat/ # ls FREEBSD-Xlist FREEBSD-vendor atomicio.h netcat.c FREEBSD-upgrade atomicio.c nc.1 socks.c # You can check the FTP server for other versions of the OS (e. g. different branch and architecture, starting at ftp://ftp.freebsd.org/pub/FreeBSD/releases/, then selecting architecture and finally the OS version). There are also different ways of obtaining the sources, but the solution shown here should be sufficient. (You can use "tar xvf src.txz usr/src/contrib/netcat" to only extract the files for netcat instead of everything, but it _might_ be possible that the build process needs some files from other locations.) If you don't have wget installed, stock "ftp " command should also work for downloading. > I don't know where to find the source code in Red Hat. Me neither, but check "man hier" on a RH system to get the documentation about the file system hierarchy which should have detailed information on what is stored where. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...