suckless unix tools https://core.suckless.org/sbase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Michael Forney e6b6f34506 find: Fix buffer overflow in token stack 8 months ago
libutf paste: Support -d '\0' 9 months ago
libutil libutil/recurse: Use a single path buffer, and directory fd 10 months ago
.gitignore Add implementation of dd(1) 8 months ago
LICENSE ed: Don't match against line 0 in search() 4 years ago
Makefile Add implementation of dd(1) 8 months ago
README Import mknod from ubase 10 months ago
TODO Add a bugs section to TODO 9 months ago
arg.h arg.h: fixed argv checks order 4 years ago
basename.1 Use ISO-date-format in manpages 5 years ago
basename.c basename: support -- 2 years ago
cal.1 Fix various lint warnings in manuals 10 months ago
cal.c cal: Centre month and year above calendar 1 year ago
cat.1 Fix various lint warnings in manuals 10 months ago
cat.c concat: Use plain read/write instead of buffered stdio 3 years ago
chgrp.1 Fix various lint warnings in manuals 10 months ago
chgrp.c libutil/recurse: Use a single path buffer, and directory fd 10 months ago
chmod.1 chmod: Remove -HLP flags, and ignore symlinks during traversal 10 months ago
chmod.c libutil/recurse: Use a single path buffer, and directory fd 10 months ago
chown.1 Fix various lint warnings in manuals 10 months ago
chown.c libutil/recurse: Use a single path buffer, and directory fd 10 months ago
chroot.1 Use ISO-date-format in manpages 5 years ago
chroot.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
cksum.1 Use ISO-date-format in manpages 5 years ago
cksum.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
cmp.1 Fix various lint warnings in manuals 10 months ago
cmp.c No need for semicolon after ARGEND 5 years ago
cols.1 Fix various lint warnings in manuals 10 months ago
cols.c Use the UTF8_POINT macro in cols(1) 4 years ago
comm.1 Use ISO-date-format in manpages 5 years ago
comm.c Rename struct linebufline to struct line and add linecmp() 4 years ago
compat.h Add compat.h 6 years ago
config.mk Use -D_FILE_OFFSET_BITS=64 by default 5 years ago
cp.1 Fix various lint warnings in manuals 10 months ago
cp.c cp: Default to -P when -R is specified 1 year ago
cron.1 Use ISO-date-format in manpages 5 years ago
cron.c Sync cron with latest scron 5 years ago
crypt.h Don't use buffered IO (fread) when not appropriate 3 years ago
cut.1 Fix various lint warnings in manuals 10 months ago
cut.c Support NUL containing lines in cut(1) 4 years ago
date.1 Fix various lint warnings in manuals 10 months ago
date.c date: Fix default format string 1 year ago
dd.1 Add implementation of dd(1) 8 months ago
dd.c Add implementation of dd(1) 8 months ago
dirname.1 Use ISO-date-format in manpages 5 years ago
dirname.c dirname: support -- 2 years ago
du.1 Fix various lint warnings in manuals 10 months ago
du.c libutil/recurse: Use a single path buffer, and directory fd 10 months ago
echo.1 Use ISO-date-format in manpages 5 years ago
echo.c Handle { NULL } argv[] properly in manual arg-reduction 3 years ago
ed.1 Fix various lint warnings in manuals 10 months ago
ed.c Add a bugs section to TODO 9 months ago
env.1 Use ISO-date-format in manpages 5 years ago
env.c env: Check unsetenv() return value 5 years ago
expand.1 Use ISO-date-format in manpages 5 years ago
expand.c No need for semicolon after ARGEND 5 years ago
expr.1 Fix various lint warnings in manuals 10 months ago
expr.c expr: Allocate arrays with reallocarray instead of VLA 1 year ago
false.1 Use ISO-date-format in manpages 5 years ago
false.c Simplify true(1) and false(1) 6 years ago
find.1 Fix various lint warnings in manuals 10 months ago
find.c find: Fix buffer overflow in token stack 8 months ago
flock.1 Fix various lint warnings in manuals 10 months ago
flock.c flock: Check for waitpid() error 5 years ago
fold.1 Fix various lint warnings in manuals 10 months ago
fold.c Support NUL containing lines in fold(1) and reuse the line-buffer(!) 4 years ago
fs.h libutil/recurse: Use a single path buffer, and directory fd 10 months ago
getconf.1 getconf: Report invalid variables as errors 3 years ago
getconf.c getconf: Add an explicit return at the end of main 10 months ago
getconf.sh getconf.sh: remove unnecessary use of cat(1) 10 months ago
grep.1 Fix various lint warnings in manuals 10 months ago
grep.c grep: Fix exit status on use of -l 1 year ago
head.1 Fix various lint warnings in manuals 10 months ago
head.c Support NUL containing lines in head(1) 4 years ago
hostname.1 Use ISO-date-format in manpages 5 years ago
hostname.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
join.1 Fix various lint warnings in manuals 10 months ago
join.c Support NUL containing lines in join(1) 4 years ago
kill.1 Use ISO-date-format in manpages 5 years ago
kill.c Handle { NULL } argv[] properly in manual arg-reduction 3 years ago
link.1 Use ISO-date-format in manpages 5 years ago
link.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
ln.1 Use ISO-date-format in manpages 5 years ago
ln.c ln: Only fail if same inode without -f flag 4 years ago
logger.1 Fix various lint warnings in manuals 10 months ago
logger.c No need for semicolon after ARGEND 5 years ago
logname.1 Use ISO-date-format in manpages 5 years ago
logname.c Handle { NULL } argv[] properly in manual arg-reduction 3 years ago
ls.1 Fix various lint warnings in manuals 10 months ago
ls.c ls, tar: Guard inclusion of sys/sysmacros.h by absence of `major` definition 1 year ago
md5.h Add crypt.[ch] and update md5sum and sha1sum 7 years ago
md5sum.1 Use ISO-date-format in manpages 5 years ago
md5sum.c *sum: Ignore -b and -t flags 10 months ago
mkdir.1 Fix various lint warnings in manuals 10 months ago
mkdir.c mkdir: Fix created directory permissions 3 years ago
mkfifo.1 Fix various lint warnings in manuals 10 months ago
mkfifo.c mkfifo: Simplify -m handling 1 year ago
mknod.1 mknod: Add support for making FIFOs 10 months ago
mknod.c mknod: Add support for making FIFOs 10 months ago
mktemp.1 Fix various lint warnings in manuals 10 months ago
mktemp.c No need for semicolon after ARGEND 5 years ago
mv.1 Use ISO-date-format in manpages 5 years ago
mv.c libutil/recurse: Use a single path buffer, and directory fd 10 months ago
nice.1 Use ISO-date-format in manpages 5 years ago
nice.c Check if PRIO_MIN and PRIO_MAX are defined 5 years ago
nl.1 Fix various lint warnings in manuals 10 months ago
nl.c Support NUL containing lines in nl(1) and reuse the line-buffer(!) 4 years ago
nohup.1 Use ISO-date-format in manpages 5 years ago
nohup.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
od.1 Fix various lint warnings in manuals 10 months ago
od.c od: For the 'c' type, format non-printable charecters as octal 2 years ago
paste.1 Use ISO-date-format in manpages 5 years ago
paste.c paste: Minor style tweaks 9 months ago
pathchk.1 Fix pathchk manpage regarding exit status 5 years ago
pathchk.c Remove unnecessary ';' after ARGEND 1 year ago
printenv.1 Fix various lint warnings in manuals 10 months ago
printenv.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
printf.1 Change the note in printf.1 on octal escapes 4 years ago
printf.c printf: handle \0 in %b arguments 4 years ago
pwd.1 Fix various lint warnings in manuals 10 months ago
pwd.c No need for semicolon after ARGEND 5 years ago
queue.h Use queue.h in grep(1) 6 years ago
readlink.1 readlink: Remove broken support for -m and -e 5 years ago
readlink.c readlink: Remove broken support for -m and -e 5 years ago
renice.1 Use ISO-date-format in manpages 5 years ago
renice.c Cleanup usage() across sbase 5 years ago
rev.1 Fix various lint warnings in manuals 10 months ago
rev.c Add rev(1) 4 years ago
rm.1 Use ISO-date-format in manpages 5 years ago
rm.c libutil/recurse: Use a single path buffer, and directory fd 10 months ago
rmdir.1 Use ISO-date-format in manpages 5 years ago
rmdir.c No need for semicolon after ARGEND 5 years ago
sed.1 Fix various lint warnings in manuals 10 months ago
sed.c sed: Include filename in error message 11 months ago
seq.1 Fix various lint warnings in manuals 10 months ago
seq.c Cleanup usage() across sbase 5 years ago
setsid.1 Use ISO-date-format in manpages 5 years ago
setsid.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
sha1.h Add crypt.[ch] and update md5sum and sha1sum 7 years ago
sha1sum.1 Use ISO-date-format in manpages 5 years ago
sha1sum.c *sum: Ignore -b and -t flags 10 months ago
sha224.h add sha224sum and sha384sum 4 years ago
sha224sum.1 add sha224sum and sha384sum 4 years ago
sha224sum.c *sum: Ignore -b and -t flags 10 months ago
sha256.h Add sha256sum(1) 7 years ago
sha256sum.1 Use ISO-date-format in manpages 5 years ago
sha256sum.c *sum: Ignore -b and -t flags 10 months ago
sha384.h add sha224sum and sha384sum 4 years ago
sha384sum.1 add sha224sum and sha384sum 4 years ago
sha384sum.c *sum: Ignore -b and -t flags 10 months ago
sha512-224.h add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 4 years ago
sha512-224sum.1 add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 4 years ago
sha512-224sum.c *sum: Ignore -b and -t flags 10 months ago
sha512-256.h add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 4 years ago
sha512-256sum.1 add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 4 years ago
sha512-256sum.c *sum: Ignore -b and -t flags 10 months ago
sha512.h Add sha512sum(1) 7 years ago
sha512sum.1 Use ISO-date-format in manpages 5 years ago
sha512sum.c *sum: Ignore -b and -t flags 10 months ago
sleep.1 Use ISO-date-format in manpages 5 years ago
sleep.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
sort.1 Fix various lint warnings in manuals 10 months ago
sort.c sort: Don't do fallback top-level sort in check mode 1 year ago
split.1 Use ISO-date-format in manpages 5 years ago
split.c Fix type mismatch in split(1) 5 years ago
sponge.1 Use ISO-date-format in manpages 5 years ago
sponge.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
strings.1 Fix various lint warnings in manuals 10 months ago
strings.c No need for semicolon after ARGEND 5 years ago
sync.1 Fix various lint warnings in manuals 10 months ago
sync.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
tail.1 Fix various lint warnings in manuals 10 months ago
tail.c tail: Process bytes with -c option, and add -m option for runes 3 years ago
tar.1 Fix various lint warnings in manuals 10 months ago
tar.c libutil/recurse: Use a single path buffer, and directory fd 10 months ago
tee.1 Use ISO-date-format in manpages 5 years ago
tee.c Don't use buffered IO (fread) when not appropriate 3 years ago
test.1 Update test.1: 4 years ago
test.c Handle { NULL } argv[] properly in manual arg-reduction 3 years ago
text.h concat: Use plain read/write instead of buffered stdio 3 years ago
tftp.1 Fix various lint warnings in manuals 10 months ago
tftp.c Include sys/time.h for timeval structure 5 years ago
time.1 Use ISO-date-format in manpages 5 years ago
time.c Fix type mismatches 5 years ago
touch.1 Fix various lint warnings in manuals 10 months ago
touch.c touch: Avoid unnecessary call to stat 4 years ago
tr.1 tr.1: Make note of some changes in the utility 4 years ago
tr.c tr: Fix infinite loop 3 years ago
true.1 Use ISO-date-format in manpages 5 years ago
true.c Simplify true(1) and false(1) 6 years ago
tsort.1 Fix various lint warnings in manuals 10 months ago
tsort.c Remove unnecessary ';' after ARGEND 1 year ago
tty.1 Use ISO-date-format in manpages 5 years ago
tty.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
uname.1 Fix various lint warnings in manuals 10 months ago
uname.c uname: check that no operands are specified 2 years ago
unexpand.1 Use ISO-date-format in manpages 5 years ago
unexpand.c No need for semicolon after ARGEND 5 years ago
uniq.1 Fix various lint warnings in manuals 10 months ago
uniq.c uniq: always store previous line length 4 years ago
unlink.1 Use ISO-date-format in manpages 5 years ago
unlink.c Revert "Do not use arg.h for tools which take no flags" 1 year ago
utf.h paste: Support -d '\0' 9 months ago
util.h libutil: Rename functions in reserved namespace to prevent potential conflict 1 year ago
uudecode.1 Fix various lint warnings in manuals 10 months ago
uudecode.c Revert "fix length after '\' getline string termination" 4 years ago
uuencode.1 Use ISO-date-format in manpages 5 years ago
uuencode.c uuencode: style: just use pointer *b 4 years ago
wc.1 Use ISO-date-format in manpages 5 years ago
wc.c wc: Removing output padding 1 year ago
which.1 Use ISO-date-format in manpages 5 years ago
which.c which: check AT_EACCESS 1 year ago
whoami.1 Add whoami(1) 5 years ago
whoami.c Handle { NULL } argv[] properly in manual arg-reduction 3 years ago
xargs.1 Fix various lint warnings in manuals 10 months ago
xargs.c Cleanup usage() across sbase 5 years ago
xinstall.1 Fix various lint warnings in manuals 10 months ago
xinstall.c install: Remove special handling for non-regular files 10 months ago
yes.1 yes: Simplify, only support one argument 1 year ago
yes.c yes: Simplify, only support one argument 1 year ago

README

sbase - suckless unix tools
===========================

sbase is a collection of unix tools that are inherently portable across
UNIX and UNIX-like systems.

The complement of sbase is ubase[1] which is Linux-specific and provides
all the non-portable tools. Together they are intended to form a base
system similar to busybox but much smaller and suckless.

Building
--------

To build sbase, simply type make. You may have to fiddle with config.mk
depending on your system.

You can also build sbase-box, which generates a single binary containing
all the required tools. You can then symlink the individual tools to
sbase-box or run: make sbase-box-install

Ideally you will want to statically link sbase. If you are on Linux we
recommend using musl-libc[2].

Portability
-----------

sbase has been compiled on a variety of different operating systems,
including Linux, *BSD, OSX, Haiku, Solaris, SCO OpenServer and others.

Various combinations of operating systems and architectures have also
been built.

You can build sbase with gcc, clang, tcc, nwcc and pcc.

Status
------

The following tools are implemented:

'#' -> UTF-8 support, '=' -> Implicit UTF-8 support, '*' -> Finished,
'|' -> Audited, 'o' -> POSIX 2013 compliant, 'x' -> Non-POSIX,
'0' -> NUL handling, '()' -> Petty flag

UTILITY MISSING
------- -------
0=*|o basename .
0=*|o cal .
0=*|o cat .
0=*|o chgrp .
0=*|o chmod .
0=*|o chown .
0=*|x chroot .
0=*|o cksum .
0=*|o cmp .
0#*|x cols .
0=*|o comm .
0=*|o cp (-i)
0=*|x cron .
0#*|o cut .
0=*|o date .
0=*|o dirname .
0=*|o du .
0=*|o echo .
o ed .
0=*|o env .
0#*|o expand .
0#*|o expr .
0=*|o false .
0= find .
0=* x flock .
0#*|o fold .
0=*|o getconf (-v)
=*|o grep .
0=*|o head .
0=*|x hostname .
0=*|x install .
0=* o join .
0=*|o kill .
0=*|o link .
0=*|o ln .
0=*|o logger .
0=*|o logname .
0#* o ls (-C, -k, -m, -p, -s, -x)
0=*|x md5sum .
0=*|o mkdir .
0=*|o mkfifo .
0=*|x mknod .
0=*|x mktemp .
0=*|o mv (-i)
0=*|o nice .
0#*|o nl .
0=*|o nohup .
0=*|o od .
0#* o pathchk .
#*|o paste .
0=*|x printenv .
0#*|o printf .
0=*|o pwd .
0=*|x readlink .
0=*|o renice .
0#* x rev .
0=*|o rm (-i)
0=*|o rmdir .
# sed .
0=*|x seq .
0=*|x setsid .
0=*|x sha1sum .
0=* x sha224sum .
0=*|x sha256sum .
0=* x sha238sum .
0=*|x sha512sum .
0=* x sha512-224sum .
0=* x sha512-256sum .
0=*|o sleep .
0#*|o sort .
0=*|o split .
0=*|x sponge .
0#*|o strings .
0=*|x sync .
0=*|o tail .
0=*|x tar .
0=*|o tee .
0=*|o test .
0=*|x tftp .
0=*|o time .
0=*|o touch .
0#*|o tr .
0=*|o true .
0=* o tsort .
0=*|o tty .
0=*|o uname .
0#*|o unexpand .
0=*|o uniq .
0=*|o unlink .
0=*|o uudecode .
0=*|o uuencode .
0#*|o wc .
0=*|x which .
0=*|x whoami .
0=*|o xargs (-p)
0=*|x yes .

[1] http://git.suckless.org/ubase/
[2] http://www.musl-libc.org/