Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 2002 10:09:20 +0200 (MEST)
From:      Lutz Kittler <Lutz.Kittler@sse-erfurt.de>
To:        "Erik Funkenbusch" <erikf@visi.com>
Cc:        <freebsd-questions@freebsd.org>
Subject:   size of /sbin/reboot
Message-ID:  <15632.15408.342031.436377@master.sse-erfurt.de>
In-Reply-To: <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK>
References:  <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK>

next in thread | previous in thread | raw e-mail | index | archive | help
Erik Funkenbusch writes:
 > 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.
 > 
 > Anyone care to explain why the file is so large, and why it's
 > copied rather than symlinked?
 > 

Hi,

as you can see these files are hardlinked :

Makefile:
LINKS= ${BINDIR}/reboot ${BINDIR}/halt \
       ${BINDIR}/reboot ${BINDIR}/fastboot \
       ${BINDIR}/reboot ${BINDIR}/fasthalt

/sbin# ls -li | grep 1238
1238 -r-xr-xr-x  4 root  wheel     227212 29 Mai 08:11 fastboot
1238 -r-xr-xr-x  4 root  wheel     227212 29 Mai 08:11 fasthalt
1238 -r-xr-xr-x  4 root  wheel     227212 29 Mai 08:11 halt
1238 -r-xr-xr-x  4 root  wheel     227212 29 Mai 08:11 reboot

Size results from static linking.

 Lutz


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?15632.15408.342031.436377>