Skip to content

adambala/homemade-unix-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:
gcc ls.c -o ls 
  1. Run the executable:
./ls /insert/your/dirname/here
  1. 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.

About

My simple implementations of some Unix commands made to practice C language.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published