From owner-freebsd-questions@FreeBSD.ORG Sun Feb 12 13:51:56 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D80AA16A420 for ; Sun, 12 Feb 2006 13:51:56 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 782C543D45 for ; Sun, 12 Feb 2006 13:51:56 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 9E3735C78; Sun, 12 Feb 2006 08:51:55 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 65140-01; Sun, 12 Feb 2006 08:51:54 -0500 (EST) Received: from [192.168.1.3] (pool-68-160-209-142.ny325.east.verizon.net [68.160.209.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 8EEE95C16; Sun, 12 Feb 2006 08:51:54 -0500 (EST) Message-ID: <43EF3D81.5000202@mac.com> Date: Sun, 12 Feb 2006 08:52:01 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: "gs_stoller@juno.com" References: <20060211.190237.29586.250540@webmail65.nyc.untd.com> In-Reply-To: <20060211.190237.29586.250540@webmail65.nyc.untd.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com Cc: freebsd-questions@freebsd.org Subject: Direct disk access, was: Re: (no subject) 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: Sun, 12 Feb 2006 13:51:57 -0000 gs_stoller@juno.com wrote: > I would like to have the source code of (the set of) programs > that can "read from"/"write to" any sector of a disk without a > file-system, think of them as the disk i/o programs that underly the > file-system. I expect them to have (collectively) about four arguments, > one specifying the disk to access, the second pointing to a buffer > (supplying the data to write or to accept the data read), the third > stating the number of bytes to transfer, and the fourth giving the LBA > address of the sector to be accessed. Sounds a bit like homework to me, but what you want is here: /usr/src/bin/dd See "man dd". -- -Chuck