Why is the file /bin/false so large?
ubuntu at tigershaunt.com
Tue Feb 9 17:58:01 UTC 2010
Sandy Harris wrote:
> I tested by writing a C one-liner that just does exit(~0) ;
> Whether or not I #include <stdio.h>, it comes out just
> under 10 K bytes.
> This is for Xubuntu 9.10 on an Intel Core 2 box,
> with the default install of gcc, and no special
> optimisation options.
> /bin/false and /bin/true are each 35216 bytes.
All that trouble and speculation, and you forget that this is an open
source system? I'll admit, for no reasonably good reason, my curiosity
has been peaked by this inane question.
#define EXIT_STATUS EXIT_FAILURE
So obviously, the one code that counts is true.c, which contains:
/* Act like "true" by default; false.c overrides this. */
# define EXIT_STATUS EXIT_SUCCESS
#if EXIT_STATUS == EXIT_SUCCESS
# define PROGRAM_NAME "true"
# define PROGRAM_NAME "false"
#define AUTHORS proper_name ("Jim Meyering")
usage (int status)
Usage: %s [ignored command line arguments]\n\
or: %s OPTION\n\
_(EXIT_STATUS == EXIT_SUCCESS
? N_("Exit with a status code indicating success.")
: N_("Exit with a status code indicating failure.")));
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
main (int argc, char **argv)
initialize_main (&argc, &argv);
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
/* Recognize --help or --version only if it's the only command-line
if (argc == 2)
if (STREQ (argv, "--help"))
if (STREQ (argv, "--version"))
version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version, AUTHORS,
(char *) NULL);
More information about the ubuntu-users