From owner-freebsd-questions@FreeBSD.ORG Thu May 15 22:12:16 2008 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 5C7281065672 for ; Thu, 15 May 2008 22:12:16 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 454CC8FC14 for ; Thu, 15 May 2008 22:12:16 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id B4C203C0505; Thu, 15 May 2008 15:12:15 -0700 (PDT) Date: Thu, 15 May 2008 15:12:15 -0700 From: Christopher Cowart To: Agus Message-ID: <20080515221215.GI18488@hal.rescomp.berkeley.edu> Mail-Followup-To: Agus , freebsd-questions References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7SrMUQONj8Rl9QNG" Content-Disposition: inline In-Reply-To: Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-questions Subject: Re: How to delete One line on tcsh 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: Thu, 15 May 2008 22:12:16 -0000 --7SrMUQONj8Rl9QNG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Agus wrote: > I've been trying to delete one line from my user tcsh history cause i mad= e a > su and it seems didnt hit enter very well so i typed the password on the > console...Now anyone that can look my history will see my pass... >=20 > I tried to edit and delete a few lines but it all comes again....tried > history clear but when i login again it apperas all again..hehe... > Its so secure and cool tcsh taht i have no idea how to do it...been a bash > user... I use this strategy with bash, so YMMV: $ vim .bash_history (kill line) $ kill -9 $$ $$ should expand to the pid of the running shell; if it doesn't in tcsh, sub it out yourself.=20 The kill -9 prevents the shell from doing it's normal exit stuff (like writing out the history) and just kills the process. You'll need to kill -9 any shell that you launched while the "bad" line was in the history file. --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --7SrMUQONj8Rl9QNG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iQIVAwUBSCy1PyPHEDszU3zYAQJvbw//U36ozSK2OK44rnZR1pK9u/rYY26jjL8f 9EeZ8pEztmgFe1k5hmExqVZxV/soSocvXwnIsnWgNFSeI6Zh2AF9HH9jwxTaeWTS gXw+277HLolaIzvr1rgn1LU4Q5SM1x+C8eX/55S4ycEKaFevWzG0WZ3Hkyry1Lv2 b9sKIAu56oNIR1Pr2VnQaWkpD/TvQLoE5evpkGp2DOQWTJK7PmPeGWaE8uKa/NVD zNIOg3I0f4Qb3L6TmSPtWe5CDNiXLYM6X19DvLeqNjRqQqLwXmUDpPCTGF2KjBvC dMFh8c0nCDRXaAMCHuEtJtLXXPcea+JDYbq0WnT84eFx3baTVOqNfZ6KK2sM5Xhv dh//Kcx2sheE3fqrzH3w8XHDfrPAEcLuDWc85Kx1FljRmOwjAdycivoGCTNVW4t0 xCv2AXnZpInB+xhvmvQZO2x9PgOXdDCjlfBslSVMES91CrxTR8Va+EqTsGJ/yIlu Z70HbHkwtw8EZE+CrTTTGzMiya2STWXSTthY+o8QD4fMVEuGtvPXr1tXINPqGaHO eBMg6x5bA1weal+lNYu6eAj/wVgP/J/jq3mDa/aUJqc3I4HZlYB0IcuZPGo4Hftk UG3E9ibXMAp8CuFY9/14CIl+r9c/E/BZtMtCQFpE+hCoKCuTmO4j4LJwmf7XZTvF 67F34iqw9bM= =Ho9q -----END PGP SIGNATURE----- --7SrMUQONj8Rl9QNG--