On 8 Aug 2025 at 1:17, Jeff Pohlmeyer wrote:

From:                   Jeff Pohlmeyer <[email protected]>
Date sent:              Fri, 8 Aug 2025 01:17:06 -0500
Subject:                Re: How to enable command `file` in busybox's 
applet?
To:                     Ahmad Gani <[email protected]>
Copies to:              [email protected]

> On Aug 7, 2025 Ahmad Gani wrote:
> 
> > I tried building BusyBox from source, but when I run ./busybox file, it 
> > says:
> > file: applet not found
> > How can I enable it?

I looked at the make menuconfig and didn't find file as a busybox 
applet. Also looked in .config, but file wasn't one of them?

I use a busybox for my G4L project and it contains these 
commands.

busybox
BusyBox v1.38.0.git (2025-07-29 01:20:17 ChST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common 
Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and 
BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
[, [[, arch, arping, ascii, awk, base32, base64, basename, bc, beep, 
blockdev, bootchartd, cat, chgrp, chmod, chown, chvt, clear, cmp, 
comm, cp, crc32, cut, date, deallocvt, df, diff, dirname, mesg, dnsd, 
dnsdomainname, dos2unix, du, dumpkmap, echo, egrep, eject, env, 
expr, false, fdflush, fdformat, fdisk, fgconsole, fgrep, find, flock, 
free, freeramdisk, fsck.minix, ftpd, getfattr, getopt, grep, halt, 
hdparm, head, hexdump, hostid, hostname, hwclock, i2ctransfer, 
id, ifconfig, ifdown, ifup, inetd, init, insmod, install, iostat, ip, 
ipaddr, ipcalc, iplink, ipneigh, iproute, iptunnel, kill, killall, klogd, 
less, linuxrc, ln, loadfont, loadkmap, logger, login, logname, 
losetup, ls, lsmod, lsof, lzop, lzopcat, makedevs, md5sum, mdev, 
mesg, mkdir, mkfifo, mkfs.minix, mknod, modinfo, modprobe, 
more, mpstat, mv, nbd-client, nc, netstat, nslookup, openvt, 
partprobe, pidof, ping, pivot_root, pmap, poweroff, powertop, 
printenv, printf, ps, pwd, raidautorun, rdate, reboot, renice, reset, 
rev, rm, rmdir, rmmod, route, sed, seedrng,     setkeycodes, sha3sum, 
sleep, smemcap, sort, stat, strings, stty, svok, swapoff, swapon, 
sync, syslogd, tail, tar, tcpsvd, tee, telnet, telnetd, test, time, top, 
touch, tr, traceroute, tree, true, truncate, ts, tsort, tty, udhcpc, 
udhcpd, uname, uniq, unix2dos, unlzop, unxz, unzip, uptime, users, 
uudecode, uuencode, w, watchdog, wc, which, who, whoami, 
whois, xargs, xz, xzcat, yes

So file was not one of those?


> 
> The problem with including something like that in busybox is not so
> much the size of the program itself, but the size of the database
> required for understanding all the different file types. For example,
> on my Artix Linux system, the /usr/bin/file binary is only 31 kb, but
> the  /usr/share/file/misc/magic.mgc database is nearly 10 MB. Many
> years ago I ran across a much smaller program with a fairly useful
> subset of file's functionality but I can't remember the name, and
> "file" is such a generic term that google isn't much help either.
> 
> -- Jeff
> _______________________________________________
> busybox mailing list
> [email protected]
> https://lists.busybox.net/mailman/listinfo/busybox



+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)     
 mailto:[email protected]                            
 mailto:[email protected]
 mailto:[email protected]
 Guam - Where America's Day Begins                        
 G4L Disk Imaging Project maintainer 
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+


_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to