From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13360 invoked from network); 27 Dec 2000 22:33:34 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Dec 2000 22:33:34 -0000 Received: (qmail 28105 invoked by alias); 27 Dec 2000 22:33:21 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3579 Received: (qmail 28098 invoked from network); 27 Dec 2000 22:33:21 -0000 Date: Wed, 27 Dec 2000 14:32:46 -0800 From: Steve Reid To: Andrej Borsenkow Cc: Vlad , zsh-users@sunsite.auc.dk Subject: Re: HOW do i.. Message-ID: <20001227143246.A64501@grok.bc.hsia.telus.net> References: <000001c06fd7$1134f930$21c9ca95@mow.siemens.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <000001c06fd7$1134f930$21c9ca95@mow.siemens.ru>; from Andrej Borsenkow on Wed, Dec 27, 2000 at 10:31:46AM +0300 On Wed, Dec 27, 2000 at 10:31:46AM +0300, Andrej Borsenkow wrote: > This can't be done, sorry. To save history entries in a file, this file should > be user-writable. It does not matter, whom this file belongs to. History file > is written (if at all) after every command. It means, user can edit it at any > time and remove any entries. This applies to any logging. Some operating systems allow you to set files append-only. For example, under FreeBSD (and I think all 4.4-derived BSDs) the command "chflags uappnd [file]" will set a file append-only, and only the owner or superuser can remove the flag. "chflags sappnd [file]" and only the superuser can remove the flag, and only if kern.securelevel is less than one. I believe Linux has similar functionality. I don't know whether or not this will work with the history mechanism. If it can be set to append each line one at a time without trying to re-write the entire file then it should work.