From owner-freebsd-questions@FreeBSD.ORG Sat Jun 2 18:29:00 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 6212C16A421 for ; Sat, 2 Jun 2007 18:29:00 +0000 (UTC) (envelope-from hunteke@earlham.edu) Received: from sipala.earlham.edu (sipala.earlham.edu [159.28.1.75]) by mx1.freebsd.org (Postfix) with ESMTP id 2159B13C448 for ; Sat, 2 Jun 2007 18:28:59 +0000 (UTC) (envelope-from hunteke@earlham.edu) Received: from [192.168.2.101] (74-132-13-58.dhcp.insightbb.com [74.132.13.58]) (authenticated bits=0) by sipala.earlham.edu (8.13.6/8.13.6) with ESMTP id l52ISr88002568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jun 2007 14:28:58 -0400 (EDT) X-Authentication-Warning: sipala.earlham.edu: Host 74-132-13-58.dhcp.insightbb.com [74.132.13.58] claimed to be [192.168.2.101] Message-ID: <4661B6E0.803@earlham.edu> Date: Sat, 02 Jun 2007 14:28:48 -0400 From: Kevin Hunter User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: sac References: <2cd0a0da0706020638g48b7ac7fn946c6e3caddc0663@mail.gmail.com> <466199E5.3040005@vindaloo.com> In-Reply-To: X-Enigmail-Version: 0.94.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD-Questions , VeeJay Subject: Re: How to disable command prompt history? 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: Sat, 02 Jun 2007 18:29:00 -0000 At 1:56p -0400 on 02 Jun 2007, sac wrote: > On 6/2/07, Christopher Hilton wrote: >> VeeJay wrote: >>> Could someone would like to describe that how we can disable to show >>> last executed commands by pressing Up Arrow? >>> >> >> That would depend on which shell you are running. Can you run the >> following command and post the results here? >> >> echo $SHELL > > By default most of the shells like bash, zsh, ksh have history option. > But you can avoid writing the history of the current session to the > history file by unsetting the HISTFILE environment variable. > So next time when you login the history of the previous session will > not be shown. I'd be curious as to the underlying "why?". Having a history of what you've done is generally a Good Thing. The only reason that I personally have ever come across to necessitate not storing my actions is when I'm playing a prank on one of my friends. Other than that, having the ability to go see what commands I was executing three years ago comes in awful handy. I /could/ recreate that arcane command sequence for that one-off job I needed 1,237 days ago, or I could do a history | grep 'substring I remember in command' | less And, if you're worried about the space it takes to store the history, don't. It's extremely negligible. Kevin