42's project, re-implement ls
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fabien Stadelwieser 6a39a5295b
Readme done
2 years ago
inc cc 4 years ago
lib/libft cc 4 years ago
src cc 4 years ago
.function_whitelist.txt all: first push 4 years ago
.gitignore all: structure prototyped 4 years ago
Makefile Last push ?? 4 years ago
README.md Readme done 2 years ago
author requirement: author file compilent to new verison 4 years ago



Reimplementation of a Darwin ls.

./ft_ls [-lRartcfuUSG] [FILES]

Implemented :

  • -l : long format
  • -R : recursive, list subdirectories
  • -a : all, show entries starting with .
  • -r : reverse sort
  • -t : sort by time

Bonus :

  • -c : sort time by ctime
  • -f : enable -aU
  • -u : sort time by access time
  • -U : do not sort, list directory in order
  • -S : sort by file size
  • -G : don't print group names


Only on MacOS, not compatible with Linux because of the ACL and other ABI.

git clone ssh://git@git.42l.fr:42084/Fabien/ls.git
cd ls

Could have made it Linux compatible if the school wasn't forbidding #indef in the norm :

#ifdef __LINUX__ // Forbidden
#elif __APPLE__ // Forbidden

How it's done

It's basically a complicated wrapper around readdir syscal.

man readdir
man opendir
man closedir


Student project for School 42.

Realized in about a week with cvignal.

Final Grade: 118/125