From owner-freebsd-questions@FreeBSD.ORG Tue Jun 9 03:44:35 2009 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 8A4CB106564A for ; Tue, 9 Jun 2009 03:44:35 +0000 (UTC) (envelope-from djuatdelta@gmail.com) Received: from mail-ew0-f212.google.com (mail-ew0-f212.google.com [209.85.219.212]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7FB8FC14 for ; Tue, 9 Jun 2009 03:44:34 +0000 (UTC) (envelope-from djuatdelta@gmail.com) Received: by ewy8 with SMTP id 8so4639923ewy.43 for ; Mon, 08 Jun 2009 20:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=belcCbh0xNOszZh5xvMtOPNnvIaSweVRutCFlNXH8YA=; b=SIV8dYO5uNON42iMov0wEeyRJV6gvy+UAoJKlhvuSG2L3jzi5b/TygUrrhgVXAoG/W zZlsR8BAWXxkfCiiJBvGrLvoWeK7Sze0KOBjcnJBEiAYobCtRConNkTyGEPjFlPayZnA imz5vkuS3n0l5jIV5qBjQTfEZQJC/9HMpapZE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=wbQUts+nJCfXnRqaJ4ulE4Ply7yISgbDUrJAdvGym0enIfrAwffgeoCZ5s6ktS9TyJ Kx9jTJqPVsSUwnmHO8rX/2KdF/j2OULJoUdivrHORcOK3WbQgoe8q+mIpYH/Ub4iSqAC tXu0dRE3TzKj5VPUnX4iag9bxwnInz5PZls/U= MIME-Version: 1.0 Received: by 10.210.91.7 with SMTP id o7mr1645245ebb.32.1244519074169; Mon, 08 Jun 2009 20:44:34 -0700 (PDT) Date: Mon, 8 Jun 2009 23:44:34 -0400 Message-ID: From: Daniel Underwood To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Reproduce previous stdout output without running previous command 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, 09 Jun 2009 03:44:35 -0000 OK, this is perhaps a weird question, capable of being very confusing. So let's take a "for instance". Suppose I run something like the Linux command "fdupes" on a directory with many large files. This operation will take considerable time to complete. When it completes, a lot of output is send to stdout (displayed on the terminal). Further suppose that after running the command, I decide I want to save the output to a text file, so I can analyze the results outside of the terminal. What can I do? Well, I can do a traditional "copy-and-paste", or I could re-enter the previous command and send it to a text file (which I ought to have done in the first place). But is there another option? Is there some variable (such as, hypothetically, $output[n], where n=some integer index) that I could use to store the results in a text file? Such an option might look like the following: $ fdupes -r ~/directorywithlotsoflargefiles (.....lots of output, woops, should have sent to a text file!....) $ output[1] >> ~/textfile.txt Hopefully this has made (some) sense.