4 ms·
The Nixpkgs search page for it https://search.nixos.org/packages?channel=25.05&show=toybox&query=toybox https://search.nixos.org/packages?channel=25.05&show=toy
by pmarreck 1y ago
The Nixpkgs search page for it https://search.nixos.org/packages?channel=25.05&show=toybox&query=toybox https://search.nixos.org/packages?channel=25.05&show=toybox&... shows the list of its outputs (executables):
[ acpi arch ascii base32 base64 basename blkdiscard blkid blockdev bunzip2 bzcat cal cat chattr chgrp chmod chown chroot chrt chvt cksum clear cmp comm count cp cpio crc32 cut date dd deallocvt devmem df dirname dmesg dnsdomainname dos2unix du echo egrep eject env expand factor fallocate false fgrep file find flock fmt fold free freeramdisk fsfreeze fstype fsync ftpget ftpput getconf getopt gpiodetect gpiofind gpioget gpioinfo gpioset grep groups gunzip halt head help hexedit host hostname httpd hwclock i2cdetect i2cdump i2cget i2cset i2ctransfer iconv id ifconfig inotifyd insmod install ionice iorenice iotop kill killall killall5 link linux32 ln logger login logname losetup ls lsattr lsmod lspci lsusb makedevs mcookie md5sum memeater microcom mix mkdir mkfifo mknod mkpasswd mkswap mktemp modinfo mount mountpoint mv nbd-client nbd-server nc netcat netstat nice nl nohup nproc nsenter od oneit openvt partprobe paste patch pgrep pidof ping ping6 pivot_root pkill pmap poweroff printenv printf prlimit ps pwd pwdx pwgen readahead readelf readlink realpath reboot renice reset rev rfkill rm rmdir rmmod rtcwake sed seq setfattr setsid sha1sum sha224sum sha256sum sha384sum sha3sum sha512sum shred shuf sleep sntp sort split stat strings su swapoff swapon switch_root sync sysctl tac tail tar taskset tee test time timeout top touch toybox true truncate ts tsort tty tunctl uclampset ulimit umount uname unicode uniq unix2dos unlink unshare uptime usleep uudecode uuencode uuidgen vconfig vmstat w watch watchdog wc wget which who whoami xargs xxd yes zcat
That's... an impressive set of Unix functionality in a single binary... AFAIK, if this works like Busybox does, these are all actually just wrappers that call into Toybox with this command as a parameter. EDIT: Nope, it's literally just symlinks with names detected by toybox that dictate how it will behave, and this is apparently called a "multicall binary"
And yes, the [ (open bracket) is a command in POSIX shell.
- daveguy 1y agoJust for reference. Here is the full list of completed and in-progress commands from the toybox website: https://landley.net/toybox/status.html https://landley.net/toybox/status.html And here is the list of the Linux standard core commands (toybox covers more than this): https://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/cmdbehav.html https://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-gene...
- pmarreck 1y agoah, Awk would be nice, from the in-progress list