From owner-freebsd-questions@freebsd.org Tue Mar 21 15:28:37 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6D5ED16B9E for ; Tue, 21 Mar 2017 15:28:37 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from cosmo.uchicago.edu (cosmo.uchicago.edu [128.135.20.71]) by mx1.freebsd.org (Postfix) with ESMTP id B5B99AE5 for ; Tue, 21 Mar 2017 15:28:37 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: by cosmo.uchicago.edu (Postfix, from userid 48) id 80FA4CB8CA1; Tue, 21 Mar 2017 10:28:36 -0500 (CDT) Received: from 128.135.52.6 (SquirrelMail authenticated user valeri) by cosmo.uchicago.edu with HTTP; Tue, 21 Mar 2017 10:28:36 -0500 (CDT) Message-ID: <64898.128.135.52.6.1490110116.squirrel@cosmo.uchicago.edu> In-Reply-To: References: <58D019EE.9030508@gmail.com> <58D1310E.6050000@gmail.com> Date: Tue, 21 Mar 2017 10:28:36 -0500 (CDT) Subject: Re: command line history broken in 11.0 From: "Valeri Galtsev" To: Trond =?iso-8859-1?Q?Endrest=F8l?= Cc: "Ernie Luzar" , "FreeBSD questions" Reply-To: galtsev@kicp.uchicago.edu User-Agent: SquirrelMail/1.4.8-5.el5.centos.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2017 15:28:37 -0000 On Tue, March 21, 2017 9:48 am, Trond Endrestøl wrote: > On Tue, 21 Mar 2017 09:56-0400, Ernie Luzar wrote: > > Running a command like this one in csh has always had the desired > effect: > > shutdown -r now Upgrade to base/stable/11 r315683. ; exit > > I usually just type in the first initial characters, like "shu", hit > the up arrow key one or more times, edit the command if needed, read > the entire command one more time, and hit the enter key. During rather long sysadmin life I learn to never do anything like that. I even can point to some examples when doing things differently screwed up fellow sysadmin (luckily that was another guy in all cases): 1. You want to execute the command and _know_ that you executed right command: _type_ the whole path to the command beginning from leading slash, e.g.: /usr/bin/su One day you will be in unusual environment, not doing so, e.g., just executing su may screw you up. This way smart students caught my older sysadmin mate: they asked him to help them with something from their account, and one of the super user commands he predictably executed was script with the same name they placed in their PATH, that piped what they needed into actual command. Bingo, they owned him. 2. Never use my own history, to execute same or similar command. You may accidentally execute next that command in history (if keyboard/ screen is slow...) Recipe for big screw up, hence bad habit. 3. Never edit different command from history. Similar recipe for screw up, psychology is such that often it is "wishful reading" - you see what you expect/want to see instead of similar yet different thing. Typing the whole command with all options forces your brain work though it thus you will be doing what you actually want to do. I know this is digression from the thread, my apologies for that. But I'd love to hear what others may add in the same lines of good sysadmin's habits. Valeri ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++