From owner-freebsd-questions@FreeBSD.ORG Tue Jul 24 11:13:01 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28D9C106566B for ; Tue, 24 Jul 2012 11:13:01 +0000 (UTC) (envelope-from yanglei.fage@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id ED8EA8FC16 for ; Tue, 24 Jul 2012 11:13:00 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so13331294pbb.13 for ; Tue, 24 Jul 2012 04:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mNuXQzs8vCkIhI8BSqxywDeFPNlehqd5RboFTt/N8tQ=; b=bhmap5BPY0pm/A749LKrrfuEc2WO8/wPUPT08ynY3JcxA6rbs1pP7Q4biMEEJX7DiQ vN3CrU+wXoR0kpCvAOkt9m9YVeRY+ggdjWnrRWwBsvwhg9fp/IilkDelHVXNDQDHaVil RAfbSDxonyqUGQA5TB+aJdi2a6Tnp0xoD4bSCDodEdbL6XfTbY4YScXL1rfAuD8vWH7D LdPM2nF4qaJjkfzD6OhC7h7piYwNUJ4zIQ6wxpo2S4MOX754WKZFO+4Q0g/qHPmItKbO YdJ8Lka4vqtYc+r909qkXeZJnURYhCTJXzdJNRpVj1exmammauV1KgmWwoja3DfzHrmJ Zj8Q== MIME-Version: 1.0 Received: by 10.68.136.233 with SMTP id qd9mr36594890pbb.166.1343128380564; Tue, 24 Jul 2012 04:13:00 -0700 (PDT) Received: by 10.142.214.20 with HTTP; Tue, 24 Jul 2012 04:13:00 -0700 (PDT) In-Reply-To: <20120723184701.f21a4744.freebsd@edvax.de> References: <20120722182545.39d6b96c.freebsd@edvax.de> <20120723163604.6e795aa4.freebsd@edvax.de> <20120723184701.f21a4744.freebsd@edvax.de> Date: Tue, 24 Jul 2012 19:13:00 +0800 Message-ID: From: lei yang To: Polytropon Content-Type: text/plain; charset=ISO-8859-1 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2012 11:13:01 -0000 On Tue, Jul 24, 2012 at 12:47 AM, Polytropon wrote: > 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 Thanks for the help, tar xvf src.txz tar: This does not look like a tar archive tar: Skipping to next header tar: Archive contains obsolescent base-64 headers tar: Read 4896 bytes from src.txz tar: Error exit delayed from previous errors [lyang0@ala-lpggp2 lyang0]$ tar xvf src.txz tar: This does not look like a tar archive tar: Skipping to next header tar: Archive contains obsolescent base-64 headers tar: Read 4896 bytes from src.txz tar: Error exit delayed from previous errors > # cd cusr/src/ontrib/netcat/ > # ls > FREEBSD-Xlist FREEBSD-vendor atomicio.h netcat.c > FREEBSD-upgrade atomicio.c nc.1 socks.c > # > > Suppose gcc -o netcat netcat.c atomicio.c socks.c should work Lei > 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, ...