https://github.com/ginglis13/rustutils
some coreutils written in rust :fried_shrimp:
https://github.com/ginglis13/rustutils
hacktoberfest
Last synced: 8 months ago
JSON representation
some coreutils written in rust :fried_shrimp:
- Host: GitHub
- URL: https://github.com/ginglis13/rustutils
- Owner: ginglis13
- Created: 2020-04-23T21:41:37.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-25T00:12:50.000Z (about 6 years ago)
- Last Synced: 2025-02-08T05:44:12.526Z (over 1 year ago)
- Topics: hacktoberfest
- Language: Rust
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rustutils
A few basic coreutils implementations written in Rust. At the moment, only compatible on Unix.
**Contributions welcome.**
## Building/Running
`cargo build` to build all binaries, then `./target/debug/$CMD` to run.
If you want to only build one binary: `cargo build --bin `.
## Utils
All utils with at least a base implementation are listed below. Each util
has a section with TODO's that are either missing options or implementationdetails for fixing existing options to match coreutils behavior.
### ls
```
Usage: ./target/debug/ls [OPTIONS] FILE
Options:
-h, --help print help information
-A list all files and directories, including dotfiles,
but not '.' and '..'
-l use a long listing format
-R recursively list contents of directory
```
**Options left/todo**
- recursive doesn't produce same style output as coreutils
- color file types
- custom sort
- -a: show hidden including '.' and '..'
- and many many more...
### cat
Pretty much just the base implementation is in place.
- 'h', '--help'
**Options left/todo**
- read from stdin if no file provided
- show ends
- show tabs
- show all
### head
```
Usage: ./target/debug/head [OPTION] FILE
Options:
-h, --help print help information
-c, --bytes NUM print the first NUM bytes of each file
-n, --lines NUM print the first NUM lines instead of the first 10
-q, --quiet never print headers giving file names
-v, --verbose always print headers giving file names
```
**Options left/todo**
- read from stdin if no file provided
### yes
:heavy_check_mark::rocket:
### env
base implemented, just uses `std::env::vars()`
### ...