sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 2c162042b14ed36f58b705fa885c05f36d7bf712
parent c9aac796c8e932b836e659024821917ef989f749
Author: Christoph Lohmann <20h@r-36.net>
Date:   Thu, 30 May 2013 21:29:56 +0200

Adding some utilities.

Thanks "Galos, David" <galosd83@students.rowan.edu>!

Diffstat:
Makefile | 6++++++
TODO | 14--------------
chgrp.1 | 22++++++++++++++++++++++
chvt.1 | 11+++++++++++
nice.1 | 18++++++++++++++++++
printenv.1 | 19+++++++++++++++++++
rmdir.1 | 25+++++++++++++++++++++++++
sync.1 | 14++++++++++++++
unlink.1 | 16++++++++++++++++
9 files changed, 131 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile @@ -22,8 +22,10 @@ LIB = \ SRC = \ basename.c \ cat.c \ + chgrp.c \ chmod.c \ chown.c \ + chvt.c \ cksum.c \ cmp.c \ cp.c \ @@ -45,10 +47,13 @@ SRC = \ nl.c \ nohup.c \ paste.c \ + printenv.c \ pwd.c \ rm.c \ + rmdir.c \ sleep.c \ sort.c \ + sync.c \ tail.c \ tee.c \ test.c \ @@ -57,6 +62,7 @@ SRC = \ tty.c \ uname.c \ uniq.c \ + unlink.c \ seq.c \ wc.c \ yes.c diff --git a/TODO b/TODO @@ -1,9 +1,5 @@ cal [-1] [-3] [-y] [year] -chgrp [-R] groupname file... - -chvt N - comm [-123] file1 file2 cut [-bcfs] [-d delim] list [file...] @@ -26,33 +22,23 @@ id [-ruGgn] username md5sum [-c] [file...] -nice [-n N] [command] - -printenv [variable...] - printf [format] [data...] printf format [argument...] readlink [-fem] file -rmdir [directory...] - seq [-s string] [N [N]] N sha1sum [-c] [file...] split [-a N] [-b N] [-l N] [input [prefix]] -sync - test [expression...] tr string1 [string2] unexpand [-a] [-t N] [file...] -unlink file - who diff --git a/chgrp.1 b/chgrp.1 @@ -0,0 +1,22 @@ +.TH CHGRP 1 sbase\-VERSION +.SH NAME +nice \- invoke a utility with an altered nice value +.SH SYNOPSIS +.B chgrp +.RB [ \-R ] +.I groupname +.I file... +.SH DESCRIPTION +.B chgrp +sets the group id of the files specified by +.IR file +to the gid of the group named +.IR group. +If the +.IR R +flag is specified, this process is recursively applied to +everything in +.IR file. + +.SH SEE ALSO +.IR chown (1) chown (2) chmod (1) chmod (2) getgrnam (3) diff --git a/chvt.1 b/chvt.1 @@ -0,0 +1,11 @@ +.TH CHVT 1 sbase\-VERSION +.SH NAME +chvt \- change foreground virtual terminal +.SH SYNOPSIS +.B chvt +.I N +.SH DESCRIPTION +.B chvt +brings /dev/ttyN to the foreground. This has the +same effect as Ctrl-Alt-FN. + diff --git a/nice.1 b/nice.1 @@ -0,0 +1,18 @@ +.TH NICE 1 sbase\-VERSION +.SH NAME +nice \- invoke a utility with an altered nice value +.SH SYNOPSIS +.B nice +.RB [ \-n inc ] +.I command +.RI [ options ...] +.SH DESCRIPTION +.B nice +invokes +.IR command +with a nice value equal to the current nice value plus +.IR inc, +which defaults to 10 if unspecified. + +.SH SEE ALSO +.IR renice (1) nice (2) diff --git a/printenv.1 b/printenv.1 @@ -0,0 +1,19 @@ +.TH PRINTENV 1 sbase\-VERSION +.SH NAME +printenv \- print out the environment or the values of specific variables. +.SH SYNOPSIS +.B printenv +.RB [ var... ] +.SH DESCRIPTION +.B printenv +prints the entire environment as key=values pairs when +no +.IR var +is specified. Otherwise, in the order specified, +.B printenv +prints the value only of each +.IR var, +one per line. + +.SH SEE ALSO +.IR env (1) diff --git a/rmdir.1 b/rmdir.1 @@ -0,0 +1,25 @@ +.TH RMDIR 1 sbase\-VERSION +.SH NAME +rmdir \- remove a directory +.SH SYNOPSIS +.B rmdir +.I directory... +.SH DESCRIPTION +.B rmdir +attempts to remove all non-full directories specified +by +.IR directory. +.SH BUGS +Subdirectories are removed in the order specified, so +.nf + rmdir foo/bar foo +.fi +will be successful, but +.nf + rmdir foo foo/bar +.fi +will only succeed in removing +.BR foo/bar. + +.SH SEE ALSO +.IR rm (1) rmdir (2) unlink (1) unlink (2) diff --git a/sync.1 b/sync.1 @@ -0,0 +1,14 @@ +.TH SYNC 1 sbase\-VERSION +.SH NAME +sync \- flush disk cache +.SH SYNOPSIS +.B sync +.SH DESCRIPTION +.B sync +invokes +.IR sync(2) +to flush all unwritten changes to the disk. This is +usually done before shutting down, rebooting or halting. + +.SH SEE ALSO +.IR sync (2) fsync (2) diff --git a/unlink.1 b/unlink.1 @@ -0,0 +1,16 @@ +.TH UNLINK 1 sbase\-VERSION +.SH NAME +unlink \- call the unlink function +.SH SYNOPSIS +.B unlink +.RB file +.SH DESCRIPTION +.B unlink +calls the +.IR unlink +function on +.IR file. + + +.SH SEE ALSO +.IR unlink (2)