mrjvs / 42-ft_ls

Making `ls` from scratch (subject by 42 school)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ft_ls

Remaking the ls command from scratch.
Made for school (42 school)

whats included

  • List directory and file information
  • options: -L, -r, -a, -R, -t, -u, -f, -g & -d
  • dynamic column sizing (through ENV or terminal)
  • colorized output (through ENV or -G)
  • proper handling of ACL and extended attributes

functions used from standard library

  • memory functions: malloc, free
  • dir and file functions: opendir, closedir, readdir, stat, lstat, readlink
  • permission functions: getpwuid, getgrgid, listxattr, acl_get_link_np, acl_free, acl_get_entry
  • IO functions: write, isatty, ioctl (for terminal width)
  • error functions: strerror

features considered out of scope

  • device driver information

Development setup

Run the following to compile, this requires build-essentials to be installed.

# dont have 9 cores? run it without `-j 9`
make -j 9

Then just run it with ./ft_ls

FAQ

Found a bug?

Report it in the issues tab of github

Want to add a new feature

Do it yourself, I accept PR's

What's the answer to life universe and everything?

42

Can I do X and Y with your code?

It's an MIT license, do whatever you want.

About

Making `ls` from scratch (subject by 42 school)

License:MIT License


Languages

Language:C 97.5%Language:Makefile 1.8%Language:CMake 0.6%