From owner-freebsd-questions Wed Jun 19 18:51:13 2002 Delivered-To: freebsd-questions@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id F2B9537B40D for ; Wed, 19 Jun 2002 18:51:08 -0700 (PDT) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 6ADF781464; Thu, 20 Jun 2002 11:21:06 +0930 (CST) Date: Thu, 20 Jun 2002 11:21:06 +0930 From: Greg 'groggy' Lehey To: Erik Funkenbusch Cc: freebsd-questions@freebsd.org Subject: Re: size of /sbin/reboot Message-ID: <20020620015106.GE23122@wantadilla.lemis.com> References: <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK> User-Agent: Mutt/1.3.99i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday, 19 June 2002 at 2:45:01 -0500, Erik Funkenbusch wrote: > I confess that I was taken a bit by surpise when I was digging around in my > sbin directory and noticed that /sbin/reboot is around 230k in size. 230k? > For a reboot command? A quick check of /usr/src/sbin/reboot shows that > reboot.c is only 6k in size. Add to this that the file is copied to several > other locations (ie, halt, fasthalt, etc..) and it's taking up a good chunk > of disk space for what should be such a simple command. Files in /bin and /sbin are statically linked, in other words they contain all the library functions as well. As a result, it can be much larger than the program code. > Anyone care to explain why the file is so large, and why it's copied > rather than symlinked? If yours is getting copied, something is wrong. As others have pointed out, they're linked. Symbolic links are a waste of time and space in this situation (same file system). Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message