From owner-freebsd-questions Wed Jun 19 1: 9:41 2002 Delivered-To: freebsd-questions@freebsd.org Received: from stargate.sse-erfurt.de (stargate.sse-erfurt.de [62.132.15.253]) by hub.freebsd.org (Postfix) with SMTP id 7421937B401 for ; Wed, 19 Jun 2002 01:09:34 -0700 (PDT) Received: (2041 bytes) by stargate.sse-erfurt.de via sendmail with P:stdio/R:inet_hosts/T:smtp (sender: ) id for ; Wed, 19 Jun 2002 10:11:47 +0200 (MET DST) (Smail-3.2.0.101 1997-Dec-17 #7 built DST-Jul-30) Received: from (master [192.105.75.4]) by stargate.sse-erfurt.de via smap (V2.1) id xma018306; Wed, 19 Jun 02 10:11:38 +0200 Received: (from kittler@localhost) by master.sse-erfurt.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id KAA01961; Wed, 19 Jun 2002 10:09:20 +0200 From: Lutz Kittler MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15632.15408.342031.436377@master.sse-erfurt.de> Date: Wed, 19 Jun 2002 10:09:20 +0200 (MEST) To: "Erik Funkenbusch" Cc: Subject: size of /sbin/reboot In-Reply-To: <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK> References: <007d01c21765$4fe5ef40$d28e1bd8@LW100ERIK> X-Mailer: VM 6.75 under 21.1 (patch 7) "Biscayne" XEmacs Lucid 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 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