From owner-freebsd-questions@FreeBSD.ORG Thu Nov 11 19:20:45 2004 Return-Path: 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 B1E2F16A617 for ; Thu, 11 Nov 2004 19:20:45 +0000 (GMT) Received: from smtpauth03.mail.atl.earthlink.net (smtpauth03.mail.atl.earthlink.net [209.86.89.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CD0743D1D for ; Thu, 11 Nov 2004 19:20:45 +0000 (GMT) (envelope-from algould@datawok.com) Received: from [206.255.31.21] (helo=[192.168.63.10]) by smtpauth03.mail.atl.earthlink.net with asmtp (TLSv1:RC4-MD5:128) (Exim 4.34) id 1CSKUv-0008I5-Bw; Thu, 11 Nov 2004 14:20:45 -0500 From: "Andrew L. Gould" To: freebsd-questions@freebsd.org, CHris Rich Date: Thu, 11 Nov 2004 13:20:54 -0600 User-Agent: KMail/1.6.2 References: <8292450b04111111083132f845@mail.gmail.com> In-Reply-To: <8292450b04111111083132f845@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411111320.54864.algould@datawok.com> X-ELNK-Trace: ee791d459e3d6817d780f4a490ca69563f9fea00a6dd62bcaf53f651cd6924bae868a1a028f6b410350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 206.255.31.21 Subject: Re: Outputting command to a text file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2004 19:20:45 -0000 On Thursday 11 November 2004 01:08 pm, CHris Rich wrote: > I want to use the du command to check on the sizes of files in a > directory, but i want the output to be put into a text file so I can > look at it later. > > I did some search on google, and found nothing that applied. > Searched other places (lists and things) and couldn't find what i was > looking for, perhaps i was using the wrong search terms. > > Any help will be greatly appreciated > > Thanks You can redirect the output of commands into files using '>' and '>>'. du > du_results.txt The command above will send the output of du to the file du_results.txt The command creates du_results.txt, overwriting it if it already exists. To append results to existing files, use '>>'. du >> du_results This, and other cool information can be found in the man page for your chosen shell. Best of luck, Andrew