Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 11:21:06 +0930
From:      Greg 'groggy' Lehey <grog@FreeBSD.org>
To:        Erik Funkenbusch <erikf@visi.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: size of /sbin/reboot
Message-ID:  <20020620015106.GE23122@wantadilla.lemis.com>
In-Reply-To: <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK>
References:  <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020620015106.GE23122>