Documentation
¶
Overview ¶
Package coreutils contains same types used by the core utilities implementation, including a common interface and context struct.
Index ¶
- Variables
- func FsBase(name string) string
- func JoinPath(comps []string) string
- func SplitPath(p string) []string
- type ClockFunc
- type EnvironFunc
- type ExecFunc
- type ExecOpts
- type ExecUsage
- type ExecUsageFunc
- type ExitError
- type NewFunc
- type Program
- type Runtime
- func (r *Runtime) EnvList() []string
- func (r *Runtime) FsAbs(name string) string
- func (r *Runtime) FsName(name string) string
- func (r *Runtime) FsPath(name string) string
- func (r *Runtime) Getenv(key string) string
- func (r *Runtime) LookupEnv(key string) (string, bool)
- func (r *Runtime) Now() time.Time
- func (r *Runtime) ResolvePath(path string) string
- func (r *Runtime) Terminal(fd int) bool
- func (r *Runtime) Wait(ctx context.Context, d time.Duration) error
- type SleepFunc
Constants ¶
This section is empty.
Variables ¶
var Version = strings.TrimSpace(versionText)
Version is the version of the core utilities, as kept in version.txt.
Functions ¶
Types ¶
type EnvironFunc ¶
type EnvironFunc func() []string
EnvironFunc is a function signature for the Runtime.Environ function.
type ExecFunc ¶
ExecFunc is a function signature for the Runtime.Exec function. It runs the utility described by opts, waiting for its completion and returning its exit status. When the utility cannot be found, cannot be invoked, or is terminated by a signal, it returns an error along with the status the caller should exit with: 127, 126 or 125, respectively.
type ExecOpts ¶
type ExecOpts struct {
// Name is the utility to run, resolved in its PATH.
Name string
// Args are the arguments to run the utility with.
Args []string
// Dir is the directory to run the utility in. An empty one stands for
// the working directory.
Dir string
// Env is the exact environment to run the utility with, as "KEY=VALUE"
// strings. A nil one means an empty environment, never the process one.
Env []string
// Stdin is the standard input of the utility. A nil one is the null
// device, since the results of the utility reading the same input as
// its caller are unspecified.
Stdin io.Reader
// Stdout is the standard output of the utility. A nil one is the
// runtime's Stdout.
Stdout io.Writer
// Stderr is the standard error of the utility. A nil one is the
// runtime's Stderr.
Stderr io.Writer
}
ExecOpts describes one execution of a utility.
type ExecUsage ¶
type ExecUsage struct {
// UserTime is the user CPU time of the children.
UserTime time.Duration
// SysTime is the system CPU time of the children.
SysTime time.Duration
// MaxRSS is the maximum resident set size of a child, in bytes.
MaxRSS uint64
// MinorFaults and MajorFaults are the page faults the children took,
// not needing and needing real I/O, respectively.
MinorFaults, MajorFaults uint64
// VoluntarySwitches and InvoluntarySwitches are the context switches
// the children gave up and were preempted through.
VoluntarySwitches, InvoluntarySwitches uint64
// FSInputs and FSOutputs are the physical block reads and writes of
// the children.
FSInputs, FSOutputs uint64
// SocketsReceived and SocketsSent are the socket messages the children
// received and sent.
SocketsReceived, SocketsSent uint64
// Swaps are the times the children were swapped out.
Swaps uint64
// Signals are the signals the children received.
Signals uint64
}
ExecUsage carries the resource usage of executed children, in the portable shape of the rusage counters. All the counters besides MaxRSS are cumulative totals, so a delta of two snapshots yields the share of the executions between them; MaxRSS is the high-water mark of the children, so a delta keeps the larger of the two snapshots. The kernel-dependent fields a platform doesn't track are reported as zero.
func (ExecUsage) Sub ¶
Sub returns the delta of the two snapshots, subtracting each counter of other from the one of u, and keeping the larger MaxRSS, as a high water mark. Negative counter differences saturate at zero, so reused or out-of-order snapshots degrade to zeroed counters rather than wrapping.
type ExecUsageFunc ¶
ExecUsageFunc reports the cumulative resource usage of the children the runtime has executed so far, reporting whether such counts are available. The reported value counts every child completed since the runtime started, so callers take a delta between two reports to attribute a share to one execution.
type ExitError ¶
ExitError is a custom error type that should ideally be used for every error returned by core utilities execution.
type NewFunc ¶
NewFunc is a function signature that every core utility package should follow for their `package.New` funcs.
type Runtime ¶
type Runtime struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
FS fsx.FS
WorkingDir string
// Environ enumerates the environment of the runtime, as "KEY=VALUE"
// strings. If nil, the environment is treated as empty.
Environ EnvironFunc
// Umask is the file mode creation mask. It's used by utilities like chmod
// when a symbolic mode doesn't specify who. The zero value means no
// masking.
Umask fs.FileMode
// Clock returns the current time. It's used by utilities that need the
// current time, like date, so tests can replace it. If nil, real time is
// used.
Clock ClockFunc
// Sleep blocks for a given duration or until the context is done. It's
// used by utilities that wait for more input, like tail -f, so that tests
// can replace the waiting instead of spending real time. If nil, a real
// sleep is used.
Sleep SleepFunc
// IsTerminal reports whether the given file descriptor number is open
// and associated with a terminal. It's used by utilities that test their
// standard streams, like test. If nil, the descriptors 0, 1 and 2 are
// checked against Stdin, Stdout and Stderr with a platform-specific
// terminal check.
IsTerminal func(fd int) bool
// ProcessAlive reports whether the process with the given ID exists.
// It's used by utilities that watch other processes, like tail --pid.
// If nil, such watching is unsupported.
ProcessAlive func(pid int) bool
// Exec runs a utility, waiting for its completion. It's used by
// utilities that invoke other programs, like xargs, env and find's
// -exec and -execdir primaries. If nil, such utilities fail instead of
// running anything.
Exec ExecFunc
// ExecUsage reports the cumulative resource usage of the processes
// executed so far, like getrusage(RUSAGE_CHILDREN). Utilities that
// time an application, like time, bracket their Exec call with two
// reports and subtract them to get the usage of one execution. If nil,
// such usage is unavailable.
ExecUsage ExecUsageFunc
}
Runtime is a context struct containing core stuff that a core utility need to work.
func SystemRuntime ¶
SystemRuntime returns a Runtime wired to the real operating system, using workingDir as the working directory. An empty workingDir means the current working directory, which is left empty when it can't be determined. A relative workingDir is made absolute when possible.
func (*Runtime) EnvList ¶
EnvList returns the environment of the runtime, as "KEY=VALUE" strings, to give to Exec. It returns nil when there's no environment.
func (*Runtime) FsAbs ¶
FsAbs makes name absolute relative to the working directory, with forward slashes but without cleaning it.
func (*Runtime) FsName ¶
FsName resolves name relative to the working directory with forward slashes, keeping rooted names as they are.
func (*Runtime) FsPath ¶
FsPath resolves name relative to the working directory, cleaned and with forward slashes, as the file system expects it. An empty name stays empty.
func (*Runtime) Getenv ¶
Getenv returns the value of an environment variable of the runtime, or the empty string when it's not set.
func (*Runtime) LookupEnv ¶
LookupEnv returns the value of an environment variable of the runtime, reporting whether it's set. It returns "", false when Environ is nil.
func (*Runtime) ResolvePath ¶
ResolvePath resolves a path relative to the working directory. If path is absolute, it's returned untouched.
func (*Runtime) Terminal ¶
Terminal reports whether the given file descriptor number is open and associated with a terminal, honoring Runtime.IsTerminal when set.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
base32
command
Command base32 is a thin wrapper around the base32 core utility.
|
Command base32 is a thin wrapper around the base32 core utility. |
|
base64
command
Command base64 is a thin wrapper around the base64 core utility.
|
Command base64 is a thin wrapper around the base64 core utility. |
|
basename
command
Command basename is a thin wrapper around the basename core utility.
|
Command basename is a thin wrapper around the basename core utility. |
|
cat
command
Command cat is a thin wrapper around the cat core utility.
|
Command cat is a thin wrapper around the cat core utility. |
|
chgrp
command
Command chgrp is a thin wrapper around the chgrp core utility.
|
Command chgrp is a thin wrapper around the chgrp core utility. |
|
chmod
command
Command chmod is a thin wrapper around the chmod core utility.
|
Command chmod is a thin wrapper around the chmod core utility. |
|
chown
command
Command chown is a thin wrapper around the chown core utility.
|
Command chown is a thin wrapper around the chown core utility. |
|
cksum
command
Command cksum is a thin wrapper around the cksum core utility.
|
Command cksum is a thin wrapper around the cksum core utility. |
|
cmp
command
Command cmp is a thin wrapper around the cmp core utility.
|
Command cmp is a thin wrapper around the cmp core utility. |
|
comm
command
Command comm is a thin wrapper around the comm core utility.
|
Command comm is a thin wrapper around the comm core utility. |
|
compress
command
Command compress is a thin wrapper around the POSIX compress core utility.
|
Command compress is a thin wrapper around the POSIX compress core utility. |
|
cp
command
Command cp is a thin wrapper around the cp core utility.
|
Command cp is a thin wrapper around the cp core utility. |
|
csplit
command
Command csplit is a thin wrapper around the csplit core utility.
|
Command csplit is a thin wrapper around the csplit core utility. |
|
cut
command
Command cut is a thin wrapper around the cut core utility.
|
Command cut is a thin wrapper around the cut core utility. |
|
date
command
Command date is a thin wrapper around the date core utility.
|
Command date is a thin wrapper around the date core utility. |
|
dd
command
Command dd is a thin wrapper around the dd core utility.
|
Command dd is a thin wrapper around the dd core utility. |
|
diff
command
Command diff is a thin wrapper around the diff core utility.
|
Command diff is a thin wrapper around the diff core utility. |
|
dirname
command
Command dirname is a thin wrapper around the dirname core utility.
|
Command dirname is a thin wrapper around the dirname core utility. |
|
du
command
Command du is a thin wrapper around the du core utility.
|
Command du is a thin wrapper around the du core utility. |
|
echo
command
Command echo is a thin wrapper around the echo core utility.
|
Command echo is a thin wrapper around the echo core utility. |
|
env
command
Command env is a thin wrapper around the env core utility.
|
Command env is a thin wrapper around the env core utility. |
|
expand
command
Command expand is a thin wrapper around the expand core utility.
|
Command expand is a thin wrapper around the expand core utility. |
|
expr
command
Command expr is a thin wrapper around the expr core utility.
|
Command expr is a thin wrapper around the expr core utility. |
|
false
command
Command false is a thin wrapper around the false core utility.
|
Command false is a thin wrapper around the false core utility. |
|
find
command
Command find is a thin wrapper around the find core utility.
|
Command find is a thin wrapper around the find core utility. |
|
fold
command
Command fold is a thin wrapper around the fold core utility.
|
Command fold is a thin wrapper around the fold core utility. |
|
grep
command
Command grep is a thin wrapper around the grep core utility.
|
Command grep is a thin wrapper around the grep core utility. |
|
gunzip
command
Command gunzip is a thin wrapper around the gunzip core utility.
|
Command gunzip is a thin wrapper around the gunzip core utility. |
|
gzcat
command
Command gzcat is a thin wrapper around the gzcat core utility.
|
Command gzcat is a thin wrapper around the gzcat core utility. |
|
gzip
command
Command gzip is a thin wrapper around the gzip core utility.
|
Command gzip is a thin wrapper around the gzip core utility. |
|
head
command
Command head is a thin wrapper around the head core utility.
|
Command head is a thin wrapper around the head core utility. |
|
id
command
Command id is a thin wrapper around the id core utility.
|
Command id is a thin wrapper around the id core utility. |
|
install
command
Command install is a thin wrapper around the install core utility.
|
Command install is a thin wrapper around the install core utility. |
|
join
command
Command join is a thin wrapper around the join core utility.
|
Command join is a thin wrapper around the join core utility. |
|
link
command
Command link is a thin wrapper around the link core utility.
|
Command link is a thin wrapper around the link core utility. |
|
ln
command
Command ln is a thin wrapper around the ln core utility.
|
Command ln is a thin wrapper around the ln core utility. |
|
logname
command
Command logname is a thin wrapper around the logname core utility.
|
Command logname is a thin wrapper around the logname core utility. |
|
ls
command
Command ls is a thin wrapper around the ls core utility.
|
Command ls is a thin wrapper around the ls core utility. |
|
md5sum
command
Command md5sum is a thin wrapper around the md5sum core utility.
|
Command md5sum is a thin wrapper around the md5sum core utility. |
|
mkdir
command
Command mkdir is a thin wrapper around the mkdir core utility.
|
Command mkdir is a thin wrapper around the mkdir core utility. |
|
mktemp
command
Command mktemp is a thin wrapper around the mktemp core utility.
|
Command mktemp is a thin wrapper around the mktemp core utility. |
|
mv
command
Command mv is a thin wrapper around the mv core utility.
|
Command mv is a thin wrapper around the mv core utility. |
|
nice
command
Command nice is a thin wrapper around the nice core utility.
|
Command nice is a thin wrapper around the nice core utility. |
|
nl
command
nl is a thin wrapper around the nl core utility implementation.
|
nl is a thin wrapper around the nl core utility implementation. |
|
nohup
command
Command nohup is a thin wrapper around the nohup core utility.
|
Command nohup is a thin wrapper around the nohup core utility. |
|
nproc
command
Command nproc is a thin wrapper around the nproc core utility.
|
Command nproc is a thin wrapper around the nproc core utility. |
|
od
command
Command od is a thin wrapper around the od core utility.
|
Command od is a thin wrapper around the od core utility. |
|
paste
command
Command paste is a thin wrapper around the paste core utility.
|
Command paste is a thin wrapper around the paste core utility. |
|
patch
command
Command patch is a thin wrapper around the patch core utility.
|
Command patch is a thin wrapper around the patch core utility. |
|
pr
command
|
|
|
printenv
command
Command printenv is a thin wrapper around the printenv core utility.
|
Command printenv is a thin wrapper around the printenv core utility. |
|
printf
command
Command printf is a thin wrapper around the printf core utility.
|
Command printf is a thin wrapper around the printf core utility. |
|
pwd
command
Command pwd is a thin wrapper around the pwd core utility.
|
Command pwd is a thin wrapper around the pwd core utility. |
|
readlink
command
Command readlink is a thin wrapper around the readlink core utility.
|
Command readlink is a thin wrapper around the readlink core utility. |
|
realpath
command
Command realpath is a thin wrapper around the realpath core utility.
|
Command realpath is a thin wrapper around the realpath core utility. |
|
rm
command
Command rm is a thin wrapper around the rm core utility.
|
Command rm is a thin wrapper around the rm core utility. |
|
rmdir
command
Command rmdir is a thin wrapper around the rmdir core utility.
|
Command rmdir is a thin wrapper around the rmdir core utility. |
|
sed
command
Command sed is a thin wrapper around the sed core utility.
|
Command sed is a thin wrapper around the sed core utility. |
|
seq
command
Command seq is a thin wrapper around the seq core utility.
|
Command seq is a thin wrapper around the seq core utility. |
|
sha1sum
command
Command sha1sum is a thin wrapper around the sha1sum core utility.
|
Command sha1sum is a thin wrapper around the sha1sum core utility. |
|
sha224sum
command
Command sha224sum is a thin wrapper around the sha224sum core utility.
|
Command sha224sum is a thin wrapper around the sha224sum core utility. |
|
sha256sum
command
Command sha256sum is a thin wrapper around the sha256sum core utility.
|
Command sha256sum is a thin wrapper around the sha256sum core utility. |
|
sha384sum
command
Command sha384sum is a thin wrapper around the sha384sum core utility.
|
Command sha384sum is a thin wrapper around the sha384sum core utility. |
|
sha512sum
command
Command sha512sum is a thin wrapper around the sha512sum core utility.
|
Command sha512sum is a thin wrapper around the sha512sum core utility. |
|
shasum
command
Command shasum is a thin wrapper around the shasum core utility.
|
Command shasum is a thin wrapper around the shasum core utility. |
|
shuf
command
Command shuf is a thin wrapper around the shuf core utility.
|
Command shuf is a thin wrapper around the shuf core utility. |
|
sleep
command
Command sleep is a thin wrapper around the sleep core utility.
|
Command sleep is a thin wrapper around the sleep core utility. |
|
sort
command
Command sort is a thin wrapper around the sort core utility.
|
Command sort is a thin wrapper around the sort core utility. |
|
split
command
Command split is a thin wrapper around the split core utility.
|
Command split is a thin wrapper around the split core utility. |
|
stat
command
Command stat is a thin wrapper around the stat core utility.
|
Command stat is a thin wrapper around the stat core utility. |
|
strings
command
Command strings is a thin wrapper around the strings core utility.
|
Command strings is a thin wrapper around the strings core utility. |
|
sync
command
Command sync is a thin wrapper around the sync core utility.
|
Command sync is a thin wrapper around the sync core utility. |
|
tac
command
Command tac is a thin wrapper around the tac core utility.
|
Command tac is a thin wrapper around the tac core utility. |
|
tail
command
Command tail is a thin wrapper around the tail core utility.
|
Command tail is a thin wrapper around the tail core utility. |
|
tar
command
Command tar is a thin wrapper around the tar core utility.
|
Command tar is a thin wrapper around the tar core utility. |
|
tee
command
Command tee is a thin wrapper around the tee core utility.
|
Command tee is a thin wrapper around the tee core utility. |
|
test
command
Command test is a thin wrapper around the test core utility.
|
Command test is a thin wrapper around the test core utility. |
|
time
command
Command time is a thin wrapper around the time core utility.
|
Command time is a thin wrapper around the time core utility. |
|
timeout
command
Command timeout is a thin wrapper around the timeout core utility.
|
Command timeout is a thin wrapper around the timeout core utility. |
|
touch
command
Command touch is a thin wrapper around the touch core utility.
|
Command touch is a thin wrapper around the touch core utility. |
|
tr
command
Command tr is a thin wrapper around the tr core utility.
|
Command tr is a thin wrapper around the tr core utility. |
|
true
command
Command true is a thin wrapper around the true core utility.
|
Command true is a thin wrapper around the true core utility. |
|
truncate
command
Command truncate is a thin wrapper around the truncate core utility.
|
Command truncate is a thin wrapper around the truncate core utility. |
|
uname
command
Command uname is a thin wrapper around the uname core utility.
|
Command uname is a thin wrapper around the uname core utility. |
|
uncompress
command
Command uncompress is a thin wrapper around the POSIX uncompress core utility, restoring files instead of compressing them.
|
Command uncompress is a thin wrapper around the POSIX uncompress core utility, restoring files instead of compressing them. |
|
unexpand
command
Command unexpand is a thin wrapper around the unexpand core utility.
|
Command unexpand is a thin wrapper around the unexpand core utility. |
|
uniq
command
Command uniq is a thin wrapper around the uniq core utility.
|
Command uniq is a thin wrapper around the uniq core utility. |
|
unlink
command
Command unlink is a thin wrapper around the unlink core utility.
|
Command unlink is a thin wrapper around the unlink core utility. |
|
uudecode
command
Command uudecode is a thin wrapper around the uudecode core utility.
|
Command uudecode is a thin wrapper around the uudecode core utility. |
|
uuencode
command
Command uuencode is a thin wrapper around the uuencode core utility.
|
Command uuencode is a thin wrapper around the uuencode core utility. |
|
wc
command
Command wc is a thin wrapper around the wc core utility.
|
Command wc is a thin wrapper around the wc core utility. |
|
which
command
Command which is a thin wrapper around the which core utility.
|
Command which is a thin wrapper around the which core utility. |
|
whoami
command
Command whoami is a thin wrapper around the whoami core utility.
|
Command whoami is a thin wrapper around the whoami core utility. |
|
xargs
command
Command xargs is a thin wrapper around the xargs core utility.
|
Command xargs is a thin wrapper around the xargs core utility. |
|
yes
command
Command yes is a thin wrapper around the yes core utility.
|
Command yes is a thin wrapper around the yes core utility. |
|
zcat
command
Command zcat is a thin wrapper around the zcat core utility.
|
Command zcat is a thin wrapper around the zcat core utility. |
|
internal
|
|
|
backup
Package backup implements the backup scheme which the GNU utilities that overwrite or remove files (cp, install, ln and mv) share: before a file is replaced, it can be renamed aside, either under a simple name holding a suffix or under a numbered one.
|
Package backup implements the backup scheme which the GNU utilities that overwrite or remove files (cp, install, ln and mv) share: before a file is replaced, it can be renamed aside, either under a simple name holding a suffix or under a numbered one. |
|
basex
Package basex implements the behavior shared by the base32 and base64 utilities, on top of the RFC 4648 encodings of the standard library.
|
Package basex implements the behavior shared by the base32 and base64 utilities, on top of the RFC 4648 encodings of the standard library. |
|
bracket
Package bracket translates the POSIX bracket expressions shared by the basic and extended regular expressions.
|
Package bracket translates the POSIX bracket expressions shared by the basic and extended regular expressions. |
|
bre
Package bre compiles POSIX basic regular expressions.
|
Package bre compiles POSIX basic regular expressions. |
|
charset
Package charset implements the character set syntax shared by the utilities that translate characters, like tr and the y command of sed.
|
Package charset implements the character set syntax shared by the utilities that translate characters, like tr and the y command of sed. |
|
cmdutil
Package cmdutil helps the main packages of the core utilities.
|
Package cmdutil helps the main packages of the core utilities. |
|
cnum
Package cnum scans the C-style integers of the core utility operands, with the base of the digits detected the way C takes it: hexadecimal with a 0x or 0X prefix, octal with a leading 0, and decimal otherwise.
|
Package cnum scans the C-style integers of the core utility operands, with the base of the digits detected the way C takes it: hexadecimal with a 0x or 0X prefix, octal with a leading 0, and decimal otherwise. |
|
ctxio
Package ctxio provides I/O helpers that stop operations once a context is done.
|
Package ctxio provides I/O helpers that stop operations once a context is done. |
|
diff
Package diff implements the line diffing shared by the diff and patch utilities: the line splitting, the blank comparison of diff's -b, and the Myers algorithm that computes the changes between two sequences of lines.
|
Package diff implements the line diffing shared by the diff and patch utilities: the line splitting, the blank comparison of diff's -b, and the Myers algorithm that computes the changes between two sequences of lines. |
|
digest
Package digest implements the behavior shared by the checksum utilities md5sum, sha1sum and the sha*sum family.
|
Package digest implements the behavior shared by the checksum utilities md5sum, sha1sum and the sha*sum family. |
|
durationparse
Package durationparse parses the duration operands sleep and timeout take: a non-negative number, as strtod would read it, with an optional s, m, h or d unit suffix.
|
Package durationparse parses the duration operands sleep and timeout take: a non-negative number, as strtod would read it, with an optional s, m, h or d unit suffix. |
|
ere
Package ere compiles POSIX extended regular expressions.
|
Package ere compiles POSIX extended regular expressions. |
|
filehdr
Package filehdr writes the "==> name <==" headers which precede the output of each input file, as head and tail print them.
|
Package filehdr writes the "==> name <==" headers which precede the output of each input file, as head and tail print them. |
|
fileinfo
Package fileinfo reports the information a file system may hold about a file beyond what io/fs models, read from the Sys value of its FileInfo: identifiers, link counts, ownership and the time of the last status change.
|
Package fileinfo reports the information a file system may hold about a file beyond what io/fs models, read from the Sys value of its FileInfo: identifiers, link counts, ownership and the time of the last status change. |
|
filemode
Package filemode parses the mode operands shared by the utilities that match or change file permission bits, which are octal numbers or symbolic mode expressions.
|
Package filemode parses the mode operands shared by the utilities that match or change file permission bits, which are octal numbers or symbolic mode expressions. |
|
fsop
Package fsop holds the operand plumbing shared by the utilities which copy, move, install or link files: the split of the operands into sources and a target, the source-and-destination pairs they work on, the symlink and time lookups they need, and the confirmations they ask the user.
|
Package fsop holds the operand plumbing shared by the utilities which copy, move, install or link files: the split of the operands into sources and a target, the source-and-destination pairs they work on, the symlink and time lookups they need, and the confirmations they ask the user. |
|
getopt
Package getopt implements the POSIX option syntax shared by the core utilities: single-character options which may be grouped, option-arguments attached or held by the next argument, "--" ending the options, and parsing stopping at the first operand.
|
Package getopt implements the POSIX option syntax shared by the core utilities: single-character options which may be grouped, option-arguments attached or held by the next argument, "--" ending the options, and parsing stopping at the first operand. |
|
glob
Package glob compiles shell filename expansion patterns, as the pattern arguments of find and the file selection options of grep take them, into regular expressions.
|
Package glob compiles shell filename expansion patterns, as the pattern arguments of find and the file selection options of grep take them, into regular expressions. |
|
gnudate
Package gnudate parses GNU-style date strings, like the ones the -d options of date and touch take.
|
Package gnudate parses GNU-style date strings, like the ones the -d options of date and touch take. |
|
input
Package input handles the input operands shared by the core utilities: mapping the operands to files or the standard input, and opening them.
|
Package input handles the input operands shared by the core utilities: mapping the operands to files or the standard input, and opening them. |
|
numparse
Package numparse holds the ASCII digit predicates and the digits-only integer parsing shared by the utilities, so each of them keeps its own range checks, wording and overflow policy on top of them.
|
Package numparse holds the ASCII digit predicates and the digits-only integer parsing shared by the utilities, so each of them keeps its own range checks, wording and overflow policy on top of them. |
|
output
Package output handles the output operands shared by the core utilities: creating or appending the files they write, or using the standard output.
|
Package output handles the output operands shared by the core utilities: creating or appending the files they write, or using the standard output. |
|
patherr
Package patherr unwraps the path errors of the file system, so diagnostics can name the files themselves.
|
Package patherr unwraps the path errors of the file system, so diagnostics can name the files themselves. |
|
printfmt
Package printfmt holds the pieces of printf-style format strings shared by the printf utility and the -printf and -fprintf primaries of find.
|
Package printfmt holds the pieces of printf-style format strings shared by the printf utility and the -printf and -fprintf primaries of find. |
|
rex
Package rex holds the helpers shared by the basic and extended regular expression translators.
|
Package rex holds the helpers shared by the basic and extended regular expression translators. |
|
sizefmt
Package sizefmt formats sizes the GNU way: as the spec the --block-size argument of the utilities which take one stands for, and as the human readable notation of their -h.
|
Package sizefmt formats sizes the GNU way: as the spec the --block-size argument of the utilities which take one stands for, and as the human readable notation of their -h. |
|
sizeparse
Package sizeparse parses GNU-style size operands shared by the utilities which take sizes with multiplicative suffixes, like the bytes of head, tail, split and od, or the block size of ls.
|
Package sizeparse parses GNU-style size operands shared by the utilities which take sizes with multiplicative suffixes, like the bytes of head, tail, split and od, or the block size of ls. |
|
stdopts
Package stdopts implements the --help and --version options common to the core utilities, as described by the "Common options" section of the GNU Coreutils manual.
|
Package stdopts implements the --help and --version options common to the core utilities, as described by the "Common options" section of the GNU Coreutils manual. |
|
tabutil
Package tabutil implements the tab stop handling shared by the expand and unexpand utilities: parsing the tablist option-argument and walking the tab stops of a line.
|
Package tabutil implements the tab stop handling shared by the expand and unexpand utilities: parsing the tablist option-argument and walking the tab stops of a line. |
|
term
Package term reports whether file descriptors are terminals.
|
Package term reports whether file descriptors are terminals. |
|
testutil
Package testutil holds the test scaffolding shared by the core utilities tests: the table-driven runner for the common Runtime setup and assertions, and the reader, writer and file system fakes they need.
|
Package testutil holds the test scaffolding shared by the core utilities tests: the table-driven runner for the common Runtime setup and assertions, and the reader, writer and file system fakes they need. |
|
textutil
Package textutil implements the line handling shared by the text processing utilities, like skipping the fields or characters of a line.
|
Package textutil implements the line handling shared by the text processing utilities, like skipping the fields or characters of a line. |
|
usernames
Package usernames resolves the user and group identifiers of a file to the names they stand for, as ls, stat and find print them.
|
Package usernames resolves the user and group identifiers of a file to the names they stand for, as ls, stat and find print them. |
|
uux
Package uux implements the formats shared by the uuencode and uudecode utilities: the historical encoding, with its length-prefixed lines, and the framing of the base64 alternative, both wrapped by a "begin" header.
|
Package uux implements the formats shared by the uuencode and uudecode utilities: the historical encoding, with its length-prefixed lines, and the framing of the base64 alternative, both wrapped by a "begin" header. |
|
verbose
Package verbose holds the reporting levels of the utilities which change file attributes, selected by the -c and -v options, and the names they show the files they walk by in their diagnostics.
|
Package verbose holds the reporting levels of the utilities which change file attributes, selected by the -c and -v options, and the names they show the files they walk by in their diagnostics. |
|
walk
Package walk traverses the file hierarchies below given starting points, following symbolic links as its options ask for.
|
Package walk traverses the file hierarchies below given starting points, following symbolic links as its options ask for. |
|
zcore
Package zcore implements the behavior shared by the compression utilities, gzip and compress.
|
Package zcore implements the behavior shared by the compression utilities, gzip and compress. |
|
programs
|
|
|
base32
Package base32 implements the GNU base32 utility.
|
Package base32 implements the GNU base32 utility. |
|
base64
Package base64 implements the GNU base64 utility.
|
Package base64 implements the GNU base64 utility. |
|
basename
Package basename implements the POSIX and GNU basename utilities.
|
Package basename implements the POSIX and GNU basename utilities. |
|
cat
Package cat implements the GNU cat utility.
|
Package cat implements the GNU cat utility. |
|
chgrp
Package chgrp implements the POSIX chgrp utility.
|
Package chgrp implements the POSIX chgrp utility. |
|
chmod
Package chmod implements the POSIX chmod utility.
|
Package chmod implements the POSIX chmod utility. |
|
chown
Package chown implements the POSIX chown utility.
|
Package chown implements the POSIX chown utility. |
|
cksum
Package cksum implements the GNU cksum utility.
|
Package cksum implements the GNU cksum utility. |
|
cmp
Package cmp implements the POSIX and GNU cmp utilities.
|
Package cmp implements the POSIX and GNU cmp utilities. |
|
comm
Package comm implements the POSIX comm utility.
|
Package comm implements the POSIX comm utility. |
|
compress
Package compress implements the POSIX compress utility.
|
Package compress implements the POSIX compress utility. |
|
cp
Package cp implements the POSIX cp utility, plus the GNU -r, -a, -n, -u, -v, -t, -T, -d and --preserve options.
|
Package cp implements the POSIX cp utility, plus the GNU -r, -a, -n, -u, -v, -t, -T, -d and --preserve options. |
|
csplit
Package csplit implements the POSIX csplit utility.
|
Package csplit implements the POSIX csplit utility. |
|
cut
Package cut implements the cut utility: the POSIX specification plus the main GNU extensions.
|
Package cut implements the cut utility: the POSIX specification plus the main GNU extensions. |
|
date
Package date implements the POSIX date utility.
|
Package date implements the POSIX date utility. |
|
dd
Package dd implements the POSIX dd utility.
|
Package dd implements the POSIX dd utility. |
|
diff
Package diff implements the diff utility.
|
Package diff implements the diff utility. |
|
dirname
Package dirname implements the POSIX dirname utility, with the GNU extensions of accepting several name operands and of -z.
|
Package dirname implements the POSIX dirname utility, with the GNU extensions of accepting several name operands and of -z. |
|
du
Package du implements the POSIX du utility with the GNU extensions its manual describes for the options implemented here.
|
Package du implements the POSIX du utility with the GNU extensions its manual describes for the options implemented here. |
|
echo
Package echo implements the POSIX echo utility.
|
Package echo implements the POSIX echo utility. |
|
env
Package env implements the GNU env utility.
|
Package env implements the GNU env utility. |
|
expand
Package expand implements the POSIX expand utility.
|
Package expand implements the POSIX expand utility. |
|
expr
Package expr implements the POSIX expr utility, with the string keywords and the + quoting token of the GNU one.
|
Package expr implements the POSIX expr utility, with the string keywords and the + quoting token of the GNU one. |
|
false
Package false implements the POSIX false utility.
|
Package false implements the POSIX false utility. |
|
find
Package find implements the POSIX find utility with its GNU extensions.
|
Package find implements the POSIX find utility with its GNU extensions. |
|
fold
Package fold implements the POSIX fold utility.
|
Package fold implements the POSIX fold utility. |
|
grep
Package grep implements the POSIX grep utility with its GNU extensions.
|
Package grep implements the POSIX grep utility with its GNU extensions. |
|
gunzip
Package gunzip implements the gunzip command.
|
Package gunzip implements the gunzip command. |
|
gzcat
Package gzcat implements the gzcat command.
|
Package gzcat implements the gzcat command. |
|
gzip
Package gzip implements the GNU gzip utility.
|
Package gzip implements the GNU gzip utility. |
|
head
Package head implements the POSIX head utility.
|
Package head implements the POSIX head utility. |
|
id
Package id implements the POSIX id utility.
|
Package id implements the POSIX id utility. |
|
install
Package install implements the GNU install utility, which copies files while setting their mode bits and, when possible, their owner and group.
|
Package install implements the GNU install utility, which copies files while setting their mode bits and, when possible, their owner and group. |
|
join
Package join implements the POSIX join utility.
|
Package join implements the POSIX join utility. |
|
link
Package link implements the POSIX link utility.
|
Package link implements the POSIX link utility. |
|
ln
Package ln implements the POSIX ln utility.
|
Package ln implements the POSIX ln utility. |
|
logname
Package logname implements the POSIX logname utility.
|
Package logname implements the POSIX logname utility. |
|
ls
Package ls implements the ls core utility, following the GNU manual.
|
Package ls implements the ls core utility, following the GNU manual. |
|
md5sum
Package md5sum implements the GNU md5sum utility.
|
Package md5sum implements the GNU md5sum utility. |
|
mkdir
Package mkdir implements the POSIX mkdir utility.
|
Package mkdir implements the POSIX mkdir utility. |
|
mktemp
Package mktemp implements the GNU mktemp utility.
|
Package mktemp implements the GNU mktemp utility. |
|
mv
Package mv implements the POSIX mv utility, plus the GNU -n, -u, -v, -t and -T options.
|
Package mv implements the POSIX mv utility, plus the GNU -n, -u, -v, -t and -T options. |
|
nice
Package nice implements the POSIX nice utility.
|
Package nice implements the POSIX nice utility. |
|
nl
Package nl implements the POSIX nl utility with the GNU extensions.
|
Package nl implements the POSIX nl utility with the GNU extensions. |
|
nohup
Package nohup implements the POSIX nohup utility.
|
Package nohup implements the POSIX nohup utility. |
|
nproc
Package nproc implements the GNU nproc utility.
|
Package nproc implements the GNU nproc utility. |
|
od
Package od implements the od core utility, with its GNU extensions.
|
Package od implements the od core utility, with its GNU extensions. |
|
paste
Package paste implements the POSIX paste utility.
|
Package paste implements the POSIX paste utility. |
|
patch
Package patch implements the POSIX patch utility.
|
Package patch implements the POSIX patch utility. |
|
pr
Package pr implements the pr utility, with the POSIX surface and the GNU extensions.
|
Package pr implements the pr utility, with the POSIX surface and the GNU extensions. |
|
printenv
Package printenv implements the GNU printenv utility.
|
Package printenv implements the GNU printenv utility. |
|
printf
Package printf implements the POSIX printf utility.
|
Package printf implements the POSIX printf utility. |
|
pwd
Package pwd implements the POSIX pwd utility.
|
Package pwd implements the POSIX pwd utility. |
|
readlink
Package readlink implements the GNU readlink utility.
|
Package readlink implements the GNU readlink utility. |
|
realpath
Package realpath implements the GNU realpath utility.
|
Package realpath implements the GNU realpath utility. |
|
rm
Package rm implements the POSIX rm utility.
|
Package rm implements the POSIX rm utility. |
|
rmdir
Package rmdir implements the POSIX rmdir utility.
|
Package rmdir implements the POSIX rmdir utility. |
|
sed
Package sed implements the sed utility of POSIX with the GNU extensions of its invocation, commands and addresses.
|
Package sed implements the sed utility of POSIX with the GNU extensions of its invocation, commands and addresses. |
|
seq
Package seq implements the GNU seq utility.
|
Package seq implements the GNU seq utility. |
|
sha1sum
Package sha1sum implements the GNU sha1sum utility.
|
Package sha1sum implements the GNU sha1sum utility. |
|
sha224sum
Package sha224sum implements the GNU sha224sum utility.
|
Package sha224sum implements the GNU sha224sum utility. |
|
sha256sum
Package sha256sum implements the GNU sha256sum utility.
|
Package sha256sum implements the GNU sha256sum utility. |
|
sha384sum
Package sha384sum implements the GNU sha384sum utility.
|
Package sha384sum implements the GNU sha384sum utility. |
|
sha512sum
Package sha512sum implements the GNU sha512sum utility.
|
Package sha512sum implements the GNU sha512sum utility. |
|
shasum
Package shasum implements the shasum utility of the Perl distribution.
|
Package shasum implements the shasum utility of the Perl distribution. |
|
shuf
Package shuf implements the GNU shuf utility.
|
Package shuf implements the GNU shuf utility. |
|
sleep
Package sleep implements the sleep utility.
|
Package sleep implements the sleep utility. |
|
sort
Package sort implements the POSIX sort utility.
|
Package sort implements the POSIX sort utility. |
|
split
Package split implements the GNU split utility.
|
Package split implements the GNU split utility. |
|
stat
Package stat implements the stat core utility, following the GNU manual.
|
Package stat implements the stat core utility, following the GNU manual. |
|
strings
Package strings implements the POSIX strings utility.
|
Package strings implements the POSIX strings utility. |
|
sync
Package sync implements the GNU sync utility.
|
Package sync implements the GNU sync utility. |
|
tac
Package tac implements the GNU tac utility.
|
Package tac implements the GNU tac utility. |
|
tail
Package tail implements the tail utility.
|
Package tail implements the tail utility. |
|
tar
Package tar implements the tar archive utility.
|
Package tar implements the tar archive utility. |
|
tee
Package tee implements the POSIX tee utility.
|
Package tee implements the POSIX tee utility. |
|
test
Package test implements the POSIX test utility.
|
Package test implements the POSIX test utility. |
|
time
Package time implements the POSIX time utility, with the format string extensions of the GNU one.
|
Package time implements the POSIX time utility, with the format string extensions of the GNU one. |
|
timeout
Package timeout implements the POSIX timeout utility, with the GNU extensions --foreground, --verbose and the 'inf' durations.
|
Package timeout implements the POSIX timeout utility, with the GNU extensions --foreground, --verbose and the 'inf' durations. |
|
touch
Package touch implements the POSIX touch utility.
|
Package touch implements the POSIX touch utility. |
|
tr
Package tr implements the POSIX tr utility.
|
Package tr implements the POSIX tr utility. |
|
true
Package true implements the POSIX true utility.
|
Package true implements the POSIX true utility. |
|
truncate
Package truncate implements the GNU truncate utility.
|
Package truncate implements the GNU truncate utility. |
|
uname
Package uname implements the GNU uname utility.
|
Package uname implements the GNU uname utility. |
|
uncompress
Package uncompress implements the uncompress command.
|
Package uncompress implements the uncompress command. |
|
unexpand
Package unexpand implements the POSIX unexpand utility.
|
Package unexpand implements the POSIX unexpand utility. |
|
uniq
Package uniq implements the POSIX uniq utility.
|
Package uniq implements the POSIX uniq utility. |
|
unlink
Package unlink implements the POSIX unlink utility.
|
Package unlink implements the POSIX unlink utility. |
|
uudecode
Package uudecode implements the POSIX uudecode utility.
|
Package uudecode implements the POSIX uudecode utility. |
|
uuencode
Package uuencode implements the POSIX uuencode utility.
|
Package uuencode implements the POSIX uuencode utility. |
|
wc
Package wc implements the POSIX wc utility.
|
Package wc implements the POSIX wc utility. |
|
which
Package which implements the GNU which utility.
|
Package which implements the GNU which utility. |
|
whoami
Package whoami implements the GNU whoami utility.
|
Package whoami implements the GNU whoami utility. |
|
xargs
Package xargs implements the POSIX xargs utility.
|
Package xargs implements the POSIX xargs utility. |
|
yes
Package yes implements the GNU yes utility.
|
Package yes implements the GNU yes utility. |
|
zcat
Package zcat implements the zcat command.
|
Package zcat implements the zcat command. |