Skip to content

quidam213/my_ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

my_ls

Minimal recode of ls executable in C

Flags

-l : list files informations.

> ./my_ls -l
-rw-r--r-- 1 dam dam     306 Jan 24 09:31 Makefile
-rw-r--r-- 1 dam dam     129 Jan 24 16:27 README.md
-rwxr-xr-x 1 dam dam   22976 Jan 24 16:28 my_ls
drwxr-xr-x 1 dam dam      52 Jan 24 08:43 src

-a : include hidden files.

> ./my_ls -a
. .. .git .gitignore .vscode Makefile README.md my_ls src

-r : reverse the output.

> ./my_ls -r
src my_ls README.md Makefile

-t : sort by time.

> ./my_ls -t
README.md my_ls Makefile src

You can also combine multiples flags.

> ./my_ls -la
> ./my_ls -l -a -t

You can also specify the path.

> ./my_ls -l ..
> ./my_ls -a -r ~ .. /home

How to use it ?

Clone the repository or download it.

Use the Makefile to build the binary

> make          # build the binary
> make re       # rebuild if it exists
> make clean    # clean the tmp file
> make fclean   # clean all, also the binary

Then you can use it !

> ./my_ls
Makefile README.md my_ls src

Author

dam, github : quidam213

About

Recode of ls binary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors