cugo

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: MIT-0 Imports: 5 Imported by: 0

README

cugo implements Unix/Linux core utilities as a multi-call binary. Each utility is written from scratch using the reference manuals and the Go standard library. Use of external modules is intentionally rare and currently consists of the following:

About

Please visit godoc for the latest documentation, or the doc.go files within most directories.

  • See cmd/README for information on the command line interface provided by cugo
  • See src/README for information on how to import a single utility
  • See lib/README for information on the libraries written for cugo

Usage

This repository may have a somewhat odd structure, though it has made the process of building cugo or importing an individual utility into external projects trivial. No Makefile's or other tools needed.

If you want an example of importing a single utility into another project, please see cugo-mkdir-example which implements mkdir using Go's flag package.

Building from source

$ git clone git@github.com:jcmdln/cugo.git
$ cd ./cugo
$ go build

Installing as a Go module

$ go get -u github.com/jcmdln/cugo

Contributing

If you would like to contribute a utility, improve documentation, or write tests please see the CONTRIBUTING file for more information.

Documentation

Overview

Unix utilities as a multi-call binary

`cugo` provides common Unix core utilities in the form of a multi-call binary, with a focus on broad support for various Unix and Unix-like operating systems.

Directories

Path Synopsis
Package cmd provides the command line interface for `cugo`, courtesy of https://github.com/hlfstr/flagger.
Package cmd provides the command line interface for `cugo`, courtesy of https://github.com/hlfstr/flagger.
lib
Package lib provides common libraries used by cugo.
Package lib provides common libraries used by cugo.
src
Package src provides implemented core utilities used by cugo.
Package src provides implemented core utilities used by cugo.
basename
return non-directory portion of a pathname.
return non-directory portion of a pathname.
cat
concatenate and print files.
concatenate and print files.
chmod
change file mode bits.
change file mode bits.
count
count the number of elements of an array.
count the number of elements of an array.
false
return false.
return false.
groups
show group memberships.
show group memberships.
head
display the first few lines of files.
display the first few lines of files.
hostname
set or print the system hostname.
set or print the system hostname.
mkdir
create directories.
create directories.
pwd
return working directory name.
return working directory name.
rm
remove files and directories.
remove files and directories.
rmdir
remove directories.
remove directories.
sha1sum
compute and check SHA1 message digest.
compute and check SHA1 message digest.
sha224sum
compute and check SHA224 message digest.
compute and check SHA224 message digest.
sha256sum
compute and check SHA256 message digest.
compute and check SHA256 message digest.
sha384sum
compute and check SHA384 message digest.
compute and check SHA384 message digest.
sha512sum
compute and check SHA512 message digest.
compute and check SHA512 message digest.
sleep
delay for a specified amount of time.
delay for a specified amount of time.
touch
change file access and modification times.
change file access and modification times.
true
return true.
return true.
uname
print operating system information.
print operating system information.
whoami
return current user.
return current user.
yes
repeatedly affirmative.
repeatedly affirmative.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL