From owner-freebsd-questions@FreeBSD.ORG Thu Aug 28 14:31:09 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1972416A4BF for ; Thu, 28 Aug 2003 14:31:09 -0700 (PDT) Received: from mail-da-1.dns-solutions.net (mail-da-1.dns-solutions.net [69.12.115.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 5479743FE3 for ; Thu, 28 Aug 2003 14:31:08 -0700 (PDT) (envelope-from ) Received: (qmail 42934 invoked from network); 28 Aug 2003 21:31:07 -0000 Received: from unknown (HELO christabel.starbreaker.net) (matthew@starbreaker.net@209.113.232.92) by mail-da-1.dns-solutions.net - 209.113.232.92 with SMTP; 28 Aug 2003 21:31:07 -0000 Date: Thu, 28 Aug 2003 17:33:45 -0400 From: Matthew Graybosch To: Denis Troshin Message-ID: <20030828213345.GD80772@christabel.starbreaker.net> References: <1671561231.20280829005225@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1671561231.20280829005225@mail.ru> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: Necessary code or trash? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 21:31:09 -0000 On 00:52 Tue 29 Aug , Denis Troshin wrote: > Hi! > > I have FreeBSD 5.0-RELEASE. > > Why most of bin (sbin) utilities are so big. > > For example, > > rm - 410 268 bytes, > mv - 407 568 bytes, > date - 423 748 bytes. > > Do they really contain only necessary code or > have more than a half of trash? As others explained these commands and others are statically linked so that they do not depend on libraries that live in /usr. Since these are very basic commands, it's a bad idea to have them depend on a library that might not be available if only the / filesystem is mounted. Since / usually just contains /root, /bin, /sbin and a couple of others, statically linked programs in /bin and /sbin are always available, even in single user mode. Booting into single user only mounts /bin, which is why some people on the list have advised sticking with /bin/sh when asked about changing root's login shell. Hope this helps. -- Matthew Graybosch http://www.starbreaker.net "The best way to lose an argument is to throw the first punch."