Skip to content

ashish0kumar/gonix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gonix

gonix is a collection of simplified implementations of common Unix commands, written in Go. The goal is to create lightweight, fast, and minimal versions of these tools while learning systems programming in Go.

Commands

Command Description
ls Lists files and directories with support for hidden files and detailed views.
mkdir Creates new directories.
touch Creates empty files or updates timestamps of existing files.
rm Removes files and directories (supports -r and -f flags).
cat Prints file contents with optional line numbering (-n).
wc Counts lines, words, and bytes in a file or from stdin.
grep Searches for a pattern in files or stdin, supports case-insensitive search (-i).

Installation

  • Clone the repository:
git clone https://github.com/ashish0kumar/gonix.git
  • Navigate to a specific command's directory and build it:
cd gonix/<command> 
go build <command>.go

Replace <command> with any of the available commands, like ls, rm, grep, etc.

Usage

Each command follows a similar usage pattern. For example:

  • List files: ./ls
  • Remove a file: ./rm file.txt
  • Create a directory: ./mkdir newdir
  • Search for text: ./grep "pattern" file.txt

Refer to each command’s subdirectory for detailed usage instructions.

Why this project?

  • Learn systems programming with Go.
  • Implement essential Unix utilities in a lightweight manner.
  • Improve understanding of file handling, text processing, and CLI tools.

Contributions

Feel free to contribute, suggest improvements, or report issues!

About

🐧 Rewriting some Unix coreutils in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages