Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

wzykubek/core_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

core utils

Implemetations of Unix core utils in C.

Why?

For get new skills in development and reverse engineering. 🙃

Available

  • echo
  • head
  • cat
  • true
  • false

more in future...

Decisions

echo

Input text must be in quotation marks, e.g.:

echo -n "sample text"

Why? In GNU echo isn't possible to run --version or --help option via a command from PATH because echo returns all arguments to stdout. You must specify full path for it (/bin/echo) to do that.

This implementation allows to run correctly:

echo --help

true & false

These tools don't have any useless additional options. Simply returns only 0 (true) or 1 (false).

cat

Available only -n additional flag for numerate lines. In my opinion other options are useless.

Compilation

GCC

gcc -O3 utility_name.c -o binary_name

Installation

Not recommended. This is only for fun, but if you very want... you can. It should be works ok. 😄

sudo install -Dm755 "binary_name" "/usr/bin/binary_name"

Releases

No releases published

Packages

No packages published