Busy Box - Unix utilities in a single EXE

Share interesting information or links related to portable apps here.
Message
Author
Ruby
Posts: 324
Joined: Sat Sep 05, 2009 6:35 pm

Busy Box - Unix utilities in a single EXE

#1 Post by Ruby » Wed May 15, 2013 8:18 am

[Moderator note: this thread was split from the Windows GREP thread.]

---

Hey guys/gals, might be of interest to some that there's a Windows BusyBox binary available HERE

BusyBox applets are usually not the full versions of their counterparts (read: stripped versions) but I thought it might be useful to some.

Image
Image

Direct Download: http://dl.dropbox.com/u/5943991/busybox-w32/busybox.exe
VirusTotal: https://www.virustotal.com/en/file/f195 ... /analysis/

~Ruby

User avatar
Midas
Posts: 4353
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Windows GREP

#2 Post by Midas » Wed May 15, 2013 10:09 am

... All of that in a 622 KB single binary! Cool. 8)

According to http://busybox.net/, latest busybox stable is v1.20.1, so getting v1.19.1 for Windows is actually great -- my guess is the corresponding code is from around August 2011, not as outdated as other versions I've seen around. For quick reference, here's the full grep 'man page'... ;)

Code: Select all

BusyBox v1.19.1_18_0-306-geb28f73.git (2011-01-16 17:56:02 ICT) multi-call binary.

Usage: grep [-HhnlLoqvsriwFEz] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

Options:
	-H	Add 'filename:' prefix
	-h	Do not add 'filename:' prefix
	-n	Add 'line_no:' prefix
	-l	Show only names of files that match
	-L	Show only names of files that don't match
	-c	Show only count of matching lines
	-o	Show only the matching part of line
	-q	Quiet. Return 0 if PATTERN is found, 1 otherwise
	-v	Select non-matching lines
	-s	Suppress open and read errors
	-r	Recurse
	-i	Ignore case
	-w	Match whole words only
	-F	PATTERN is a literal (not regexp)
	-E	PATTERN is an extended regexp
	-z	Input is NUL terminated
	-m N	Match up to N times per file
	-A N	Print N lines of trailing context
	-B N	Print N lines of leading context
	-C N	Same as '-A N -B N'
	-e PTRN	Pattern to match
	-f FILE	Read pattern from file
And here's a great yet easy tip for running busybox commands directly:
zcattacz wrote:Try this:

Code: Select all

for cmd in `./busybox.exe --list` ; do
        echo '@"%~dp0busybox.exe" %~n0 %*'>${cmd}.bat ;
done
. Save it to busybox.sh laying besides busybox.exe;

. Open cmd console cd into that folder run "busybox.exe sh busybox.sh";

There you go, [you can] now try "cat busybox.sh" :)
Last edited by Midas on Fri Apr 20, 2018 3:48 am, edited 2 times in total.

Ruby
Posts: 324
Joined: Sat Sep 05, 2009 6:35 pm

Re: Windows GREP

#3 Post by Ruby » Wed May 15, 2013 1:39 pm

@Midas - latest busybox stable is v1.20.2

Or... you could just rename the BB executable to it's default shell (e.g. ash.exe or sh.exe) and create a shortcut

Or... you could create a .bat file to launch BB with it's default shell:

Code: Select all

@echo off
SET PATH=%~dp0;%PATH%
busybox.exe sh
~Ruby

User avatar
Ascend4nt
Posts: 61
Joined: Fri Nov 19, 2010 10:37 am
Location: NJ, USA
Contact:

Re: Windows GREP

#4 Post by Ascend4nt » Wed May 15, 2013 3:18 pm

BusyBox
That's a sweet little package! Unfortunately, Unicode doesn't appear to be a priority. Only the following 4 utilities are reported as being 'fixed' for unicode:
- cal
- lsmod
- df
- dumpleases

See the TODO_unicode file, which appears to be unchanged in new versions as well.

Ruby
Posts: 324
Joined: Sat Sep 05, 2009 6:35 pm

Re: Windows GREP

#5 Post by Ruby » Mon Sep 23, 2013 8:24 am

BusyBox
rmyorston's busybox-w32 is a fork of pclouds' busybox-w32 (I previously posted)
Website: https://frippery.org/busybox/
The latest version is always: busybox.exe - busybox64.exe
https://frippery.org/files/busybox/busybox.exe
https://frippery.org/files/busybox/busybox64.exe

~Ruby

note to mod: possible hi-jack; feel free to repurpose, e.g. >chit-chat>busybox
Last edited by Ruby on Tue Oct 03, 2017 3:55 am, edited 1 time in total.

User avatar
Midas
Posts: 4353
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Busybox & UnixKit-tiny

#6 Post by Midas » Sun Oct 27, 2013 12:23 pm

Ruby wrote:@Midas - latest busybox stable is v1.20.2
While checking something else, I noticed that the latest version mentioned at the Busybox official webpage is v1.21.1, so this info might not be completely accurate...
author of http://busybox.net/ wrote:29 June 2013 -- BusyBox 1.21.1 (stable)
Also, for an UnxUtils alternative, some may want to check UnixKit-tiny at http://eric.chromick.com/cli/unixkit-tiny/ (previously mentioned at http://www.portablefreeware.com/forums/ ... .php?t=338).
Last edited by Midas on Fri Apr 20, 2018 3:51 am, edited 1 time in total.

Ruby
Posts: 324
Joined: Sat Sep 05, 2009 6:35 pm

Re: Busybox & UnixKit-tiny

#7 Post by Ruby » Sun Oct 27, 2013 12:49 pm

Midas wrote:
Ruby wrote:@Midas - latest busybox stable is v1.20.2
  • While checking something else, I noticed that the latest version mentioned at the Busibox [Busybox] official webpage is v1.21.1, so this info might not be completely accurate...
http://busybox.net/ wrote:29 June 2013 -- BusyBox 1.21.1 (stable)
Uh... it was accurate at the time I posted it.

They also have a later 'stable' date posted (from what I remember) - 2 July 2012 -- BusyBox 1.20.2 (stable)

~Ruby

Ruby
Posts: 324
Joined: Sat Sep 05, 2009 6:35 pm

Re: Windows GREP

#8 Post by Ruby » Tue Jun 24, 2014 10:53 am

I know this topic is 'Windows GREP' but for the interested:

BusyBox v1.23.0
Image
http://intgat.tigress.co.uk/rmy/busybox/index.html

~Ruby

User avatar
Midas
Posts: 4353
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: BusyBox for Windows

#9 Post by Midas » Fri Jun 12, 2015 10:04 am

Ruby wrote:I know this topic is 'Windows GREP' but for the interested: BusyBox v1.23.0
BTW, busibox-w32 v1.24.0-FRP-15-g0ccf7a0, dated 2015-06-05, has been released (no changelog, see http://frippery.org/busybox/).

This version saves command history to '%USERPROFILE%\.ash_history' by default, making it not natively portable, but launching it in shell mode with the following batch script solves that:

Code: Select all

@%COMSPEC% /C "SET HOME=%~dp0home&& SET PATH=%PATH%%~dp0;&& TITLE BusyBox v1.24.0&& %~dp0busybox.exe sh -l"
Last edited by Midas on Fri Apr 20, 2018 3:50 am, edited 1 time in total.

User avatar
Midas
Posts: 4353
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Windows GREP

#10 Post by Midas » Sat Jan 02, 2016 6:46 am

Busybox-w32 v4.4.1 releasead (dated 2016-05-24; changelog not found; download from http://frippery.org/files/busybox/busyb ... 3c3b08.exe).
Last edited by Midas on Fri Apr 20, 2018 3:49 am, edited 1 time in total.

User avatar
__philippe
Posts: 503
Joined: Wed Jun 26, 2013 2:09 am

Re: BusyBox-Unix utilities in single executable

#11 Post by __philippe » Wed Sep 07, 2016 10:54 am

BusyBox-w32 recent release: 2016-08-16 16:02 410K

Aptly discussed in preceding posts, but perhaps worth underlining anew:

adapted from the current BusyBox --help display:
BusyBox v1.26.0-FRP-484-g977d65c (2016-08-16 15:49:02 BST)
(mingw32-gcc 6.1.0-1.fc24; mingw32-crt 5.0-0.2.rc2.v5.x.git65a0c3.20160723.fc24)

Remarkable multi-call binary combining many (128 in this release) common Unix utilities into a single 410K executable.
Some of the notable tools found therein (and notably lacking from either UnxUtils or UnixKit-Tiny competing packages):
  • awk (pattern matching utility)
  • bash (Bash shell command interpreter)
  • ps (current processes stats)
  • rev (reverse order of characters in every line of a file)
  • sh (Bourne shell command interpreter)
  • strings (find words inside binaries and other non printable files)
  • truncate (truncate a file to a specified length)
  • ...
BusyBox-w32 is a port of BusyBox to the Microsoft Windows WIN32 API.
It brings a subset of the functionality of BusyBox to Windows in a single 410K self-contained native executable.

BusyBox-w32 official site

User avatar
__philippe
Posts: 503
Joined: Wed Jun 26, 2013 2:09 am

BusyBox-Unix utilities in a single executable

#12 Post by __philippe » Thu Oct 27, 2016 8:43 am

BusyBox-w32 recent release: v1.26.0-FRP-671 (2016-10-20 15:52:42 BST) 419K

from the BusyBox --help display header:
BusyBox v1.26.0-FRP-671-ge135a80 (2016-10-20 15:52:42 BST) multi-call binary.
(mingw32-gcc 6.2.0-1.fc24; mingw32-crt 5.0-0.2.rc2.v5.x.git65a0c3.20160723.fc24)

User avatar
__philippe
Posts: 503
Joined: Wed Jun 26, 2013 2:09 am

BusyBox-Unix utilities in a single executable

#13 Post by __philippe » Tue Jan 10, 2017 5:37 am

BusyBox-w32 recent release: v1.27.0-FRP-874 (2017-01-08 09:29:54 GMT) 419k

from the BusyBox current --help display:
BusyBox v1.27.0-FRP-874-g373ca86 (2017-01-08 09:29:54 GMT) multi-call binary.
(mingw32-gcc 6.3.0-1.fc25; mingw32-crt 5.0.0-1.fc25)

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: busybox --install [DIR]
or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. The shell in this build
is configured to run built-in utilities without $PATH search.
You don't need to install a link to busybox for each utility.
To run external program, use full path (/sbin/ip instead of ip).

Currently defined functions:
[, [[, ar, ash, awk, base64, basename, bash, bunzip2, bzcat, bzip2,
cal, cat, catv, chmod, cksum, clear, cmp, comm, cp, cpio, cut, date,
dc, dd, df, diff, dirname, dos2unix, dpkg-deb, du, echo, ed, egrep,
env, expand, expr, false, fgrep, find, fold, ftpget, ftpput, getopt,
grep, groups, gunzip, gzip, hd, head, hexdump, id, ipcalc, kill,
killall, less, ln, logname, ls, lzcat, lzma, lzop, lzopcat, man,
md5sum, mkdir, mktemp, mv, nc, od, patch, pgrep, pidof, printenv,
printf, ps, pwd, rev, rm, rmdir, rpm2cpio, sed, seq, sh, sha1sum,
sha256sum, sha3sum, sha512sum, shuf, sleep, sort, split, stat, strings,
sum, tac, tail, tar, tee, test, touch, tr, true, truncate, uname,
uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unxz,
unzip, usleep, uudecode, uuencode, vi, wc, wget, which, whoami, whois,
xargs, xz, xzcat, yes, zcat

User avatar
__philippe
Posts: 503
Joined: Wed Jun 26, 2013 2:09 am

BusyBox-Unix utilities in a single executable

#14 Post by __philippe » Thu Mar 02, 2017 6:17 am

BusyBox-w32 recent release: v1.27.0-FRP-1035-g74163a5 (2017-02-09 08:42:39 GMT) 421k
(mingw32-gcc 6.3.0-1.fc25; mingw32-crt 5.0.0-1.fc25)

Two new applets added in this release, now counting 130 Unix utilities...: 8)

link
Usage: link FILE LINK
Create hard LINK to FILE

xxd
Usage: xxd [OPTIONS] [FILE]
Hex dump FILE (or stdin)

-g N Bytes per group
-c N Bytes per line
-p Show only hex bytes, assumes -c30
-l LENGTH Show only first LENGTH bytes
-s OFFSET Skip OFFSET bytes

User avatar
__philippe
Posts: 503
Joined: Wed Jun 26, 2013 2:09 am

BusyBox-Unix utilities in a single executable

#15 Post by __philippe » Sat Jun 10, 2017 12:35 pm

BusyBox-w32 recent release : v1.27.0-FRP-1144-gc2002ea (2017-05-30 12:36:42 BST) multi-call binary (423k)
(mingw32-gcc 6.3.0-1.fc25; mingw32-crt 5.0.0-1.fc25)

Three new applets added to this release:

factor
Usage: factor [NUMBER]...
Print prime factors

nl
Usage: nl [OPTIONS] [FILE]...
Write FILEs to standard output with line numbers added

-b STYLE Which lines to number - a: all, t: nonempty, n: none

-i N Line number increment

-s STRING Use STRING as line number separator

-v N Start from N

-w N Width of line numbers


paste
Usage: paste [OPTIONS] [FILE]...
Paste lines from each input file, separated with tab

-d LIST Use delimiters from LIST, not tab

-s Serial: one file at a time


Post Reply