Re: Bloat for bloat's sake

Robert Elz <[email protected]> Mon, 03 Aug 2026 22:38:45 +0700
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
    Date:        Sun, 2 Aug 2026 16:53:52 -0400
    From:        Thor Lancelot Simon <[email protected]>
    Message-ID:  <[email protected]>

  | Our installed /etc/services file is 3.4MB. 
  | which I still want to make smaller for embedded use, but... ouch!

You could use the NetBSD boot version, as mentioned by tsutsui@, if that is
adequate for your needs, but I'd just do something like:

</etc/services egrep '^(ftp|telnet|ssh|domain|snmp|bootp|smtp)' | awk '{print $1, $2}'

just listing whatever services your embedded system needs (and excluding
any it doesn't) - adding "http" (which will also include https) perhaps,
or netbios, or whaver else you need.   The command above generates 822 bytes
on my system (probably doesn't have the latest /etc/services) and could be
made smaller by adding an "egrep -v" to filter out the lines the above
finds (like "domaintime" and "ssh-mgmt" which are probably not needed).

kre

ps: If you don't know what your embedded system needs, you probably need to
include the whole (huge) thing (perhaps trimmed to just service port/proto),
as deleting any single line (except the comment lines) might be deleting
the one service that turns out to be essential.