Adding some utilities.

Thanks "Galos, David" <galosd83@students.rowan.edu>!
This commit is contained in:
Christoph Lohmann 2013-05-30 21:29:56 +02:00
parent c9aac796c8
commit 2c162042b1
9 changed files with 131 additions and 14 deletions

View File

@ -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

14
TODO
View File

@ -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

22
chgrp.1 Normal file
View File

@ -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)

11
chvt.1 Normal file
View File

@ -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.

18
nice.1 Normal file
View File

@ -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)

19
printenv.1 Normal file
View File

@ -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)

25
rmdir.1 Normal file
View File

@ -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)

14
sync.1 Normal file
View File

@ -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)

16
unlink.1 Normal file
View File

@ -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)