From owner-freebsd-questions@freebsd.org Fri May 20 18:27:10 2016 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 CEA8DB43030 for ; Fri, 20 May 2016 18:27:10 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from inet08.hamilton.harte-lyne.ca (inet08.hamilton.harte-lyne.ca [216.185.71.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "inet08.hamilton.harte-lyne.ca", Issuer "CA HLL ISSUER 01" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A4D111EE1 for ; Fri, 20 May 2016 18:27:10 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from localhost (localhost [127.0.0.1]) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTP id AF2FA61268 for ; Fri, 20 May 2016 14:17:11 -0400 (EDT) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from inet08.hamilton.harte-lyne.ca ([127.0.0.1]) by localhost (inet08.hamilton.harte-lyne.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o5T8IJ6ddczD for ; Fri, 20 May 2016 14:17:09 -0400 (EDT) Received: from webmail.harte-lyne.ca (inet04.hamilton.harte-lyne.ca [216.185.71.24]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTPSA id 63A0A621E9 for ; Fri, 20 May 2016 14:17:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harte-lyne.ca; s=dkim_hll; t=1463768229; bh=dU7VRO9+D3xTGu/N8qd8S4lq2xz8j5dz8nXJNYsEFR0=; h=Date:Subject:From:To:Reply-To; b=ZBi9D81gZcJ/BO3LcyaJYZif712cX/+gK3cpCRjtZfbxoxmBWgILqzPN8HlBJS/Z7 ez4GvXiQaZ35XXTT0f0raTLDhHX6dtYOXeU4BVPAvcZxe42AOEyc+ft+MSkVSOR5cu 8t9Jl+PpUC4jn28eaXBIRL5SQQr+zFCErVUwsXKA+RdeHvDvGlYTDZvfQdcKlkX4Mw m9fPCGDYBOzVLjQLmIDFe25kbBZyLKhIa/Dt1txe5uEQ5VXxmMIf7lpMRiDFU8mEyA ZZ/c4MycrtvTh6TUCq1weaxpNAoqTRZfUkKU+9B6mLRKiaTDh8wj2IAfFHiWKTWQ8s Q6+mrVgHpSfvw== Received: from 216.185.71.44 (SquirrelMail authenticated user byrnejb) by webmail.harte-lyne.ca with HTTP; Fri, 20 May 2016 14:17:09 -0400 Message-ID: Date: Fri, 20 May 2016 14:17:09 -0400 Subject: history utility From: "James B. Byrne" To: freebsd-questions@freebsd.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.22-4.el6 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.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2016 18:27:10 -0000 As is no doubt obvious from what I am trying to do I come from a bash background. While logged in as root I run the history command and see this: # history 1 20:02 date 12:13:30 2 20:03 date 121350 3 13:51 man adjtime 4 13:51 apropos clock 5 13:52 apropos time 6 13:53 man adjkerntz 7 13:58 man clock 8 13:58 man hwclock 9 14:00 man date . . . I am used to bash and have this in my root .bash_profile on other systems. # Timestamp History export HISTTIMEFORMAT='%F %T: ' Looking in the default ~/.profile I see this: # $FreeBSD: releng/10.3/etc/root/dot.profile 199243 2009-11-13 05:54:55Z ed $ # PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin export PATH HOME=/root export HOME TERM=${TERM:-xterm} export TERM PAGER=more export PAGER Which to me implies that adding this should work. echo "export HISTTIMEFORMAT='%F %T: '" >> .profile But nooo. What I see from source .profile is: PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin: Command not found. export: Command not found. HOME=/root: Command not found. export: Command not found. Bad : modifier in $ (-). Which tells me that .profile is either processed differently than I expect or not at all. So, my questions are: What is the purpose of .profile? How is it used? Why is there no export command found given that man sh explicitly mentions the builtin command 'export'? -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3