From owner-freebsd-questions Tue Mar 27 1:40:23 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id 8865637B718 for ; Tue, 27 Mar 2001 01:40:17 -0800 (PST) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id DAA16963; Tue, 27 Mar 2001 03:38:58 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Tue, 27 Mar 2001 03:38:57 -0600 (CST) From: Ryan Thompson To: Jason Hunt Cc: freebsd-questions@freebsd.org Subject: RE: cron In-Reply-To: Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jason Hunt wrote to Ryan Thompson: > > The temp file moved or was deleted then re-linked. Did you > > change your default editor? Maybe your editor (or invocation > > thereof) is renaming the temp file (and/or you enabled > > backups in your editor). > > No nothing like this. I didn't change editors - still vi. Before > this problem accured my server had power lost to it and the UPS failed. Hmm.. Because UNIX machines tend to have long uptimes (usually dependent only on sysadmin ;-) funny things can creep up after reboots. Why don't you try the following (choose a name "somefile" that does not exist): $ echo "Foo" > somefile $ ls -li somefile /* Note the inode number */ $ vi somefile /* Edit and save changes */ $ ls -li somefile /* Note the inode number */ Script started on Tue Mar 27 03:29:02 2001 ryan@ren $ echo "Foo" >somefile ryan@ren $ ls -li somefile 73306 -rw-rw-r-- 1 ryan staff 4 Mar 27 03:29 somefile ryan@ren $ vi somefile << typical editing session >> :wq! somefile: 3 lines, 11 characters ryan@ren $ ls -li somefile 73306 -rw-rw-r-- 1 ryan staff 11 Mar 27 03:29 somefile ryan@ren $ exit Script done on Tue Mar 27 03:29:37 2001 If the inode numbers are the same (eg., 73306), you are accessing the same file, and all is good. If the inode numbers differ before and after editing, it means vi actually unlinked the original file and re-created a new file. Depending on your setup, version/vendor of vi, this may be the case, although it is somewhat rare in practice. Other than that, perhaps the directory entry underneath is hosed in some weird way. Kill init and completely wipe your tmp directory (rm -Rf /tmp) and re-create it with the appropriate permissions (mkdir -m 4777 /tmp). > So when I got back to the machine, I was forced to run fsck > manually. I believe this has something to do with it, but still > not sure what I need to do in order to fix this program? I reran > fsck, but no luck. If you want to do it in the safest way possible (You may fix errors with different methods, but they may recur if the filesystems are mounted writable): 1 Go to single user mode (issue the command "shutdown now" as root) 2 Choose a shell 3 When greeted with the single user # prompt, unmount your filesystems (or downgrade them to read-only if necessary). 4 run fsck -p (preen mode) 5 Bring the system back up -- Ryan Thompson Network Administrator, Accounts SaskNow Technologies - http://www.sasknow.com #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2 Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message