Skip to content

Recreating the UNIX shell command ls (lists directory contents of files and directories)

Notifications You must be signed in to change notification settings

wethinkcode-archive/ft_ls

Repository files navigation

ft_ls - @WeThinkCode

ft_ls is a recreation of the unix function, ls.

Mandatory: 100/100
Bonus: 0/25
Peers: 100% (avg)

Total: 100/125

Installation:

To get started, clone the FT_ls repo and go into the folder:

git clone https://github.com/FWMoor/FT_ls
cd FT_ls/FT_ls

Make:

make

Usage:

./ft_ls [-AGRaflnprt1] [file ...]  

Flags:

-A - Shows all files (including hidden files), but doesn't show the "." and ".." directories. (Bonus)
-G - Shows normal files, but adds colour. (Bonus)
-R - Shows all files recursively.
-a - Shows all files including "." and "..".
-f - Shows normal files, unsorted. (Bonus)
-l - Shows files in long format.
-n - Shows UID and GID in long format as a number. (Bonus)
-p - Adds a '/' to the back of directory names. (Bonus)
-r - Reverses the output.
-t - Sorts files according to time.

Disclaimer:

Use my code at your own risk!

About

Recreating the UNIX shell command ls (lists directory contents of files and directories)

Resources

Stars

Watchers

Forks