Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adambala/homemade-unix-commands
My simple implementations of some Unix commands made to practice C language.
https://github.com/adambala/homemade-unix-commands
c-lang c-language shell shell-commands unix unix-command
Last synced: about 2 months ago
JSON representation
My simple implementations of some Unix commands made to practice C language.
- Host: GitHub
- URL: https://github.com/adambala/homemade-unix-commands
- Owner: adambala
- License: mit
- Created: 2023-07-16T21:22:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-24T08:23:44.000Z (over 1 year ago)
- Last Synced: 2023-07-24T08:25:22.626Z (over 1 year ago)
- Topics: c-lang, c-language, shell, shell-commands, unix, unix-command
- Language: C
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Homemade Unix commands
These C programs emulate some Unix commands. They were made by me in 2022 to practice C language.
My implementations do not claim to be an alternative to the original ones.## Setup
Showing an example of `ls`
1. Compile the executable:
```bash
gcc ls.c -o ls
```
2. Run the executable:
```bash
./ls /insert/your/dirname/here
```
3. Enjoy!## List of commands
### ls
- `ls [-al] [file]`
- `ls` only accepts a *single* file or directory as an argument, although in Unix it is possible to accept more than one;
- `-a` option completely mimics the original one: it displays all files and directories starting with a dot;
- `-l` option mimics the `-1` option from the original. It displays all files and directories line by line.### tail
- `tail [+-n] [file1] [file2] [file3] ... [fileN]`;
- `tail` accepts *multiple* files as an argument;
- `-n` option displays `n` last lines (`n = 10` by default);
- `+n` option displays file from the `n`-th line.## Contributing
This repository is open for contributing. So feel free to open issues and make pull requests.