An Unix Project at Codam (42) - ls command
Recode the system command ls
with it's basic options l, a, r, R, t
. The project has to be performed in C
language, according to internal 42 coding rules, The Norme
.
Check the following:
- repository is not empty
- repository doesn't contain unnecessarry or gabage files
- the author file is present
- the Makefile is present and contains mandatory rules
- the Makefile compiles the program in a proper way
- there are no Norminette errors or warnings
Did the work pass all the checks? If not, evaluation stops here.
Yes
No
The output must be identical to the original ls
, excepting ACLs, extended attributes, and columns management.
Perform the following tests:
- ls
- ls -a
- ls -l
- Check the correct display of symbolic links.
Repeat all the checks without parameters, then with a file, then with a directory.
Did the work pass all the checks? If not, evaluation stops here.
Yes
No
Perform the following tests:
- ls -r
- ls -t
- test on devices, sockets (there are usually in / var / run /) and pipe names (man mkfifo).
- test with several files / directories as a parameter.
- test setuid / setgid / stickybit
Did the work pass all the checks? If not, evaluation stops here.
Yes
No
Perform the following tests:
- ls -R
- management of multiple options: parsing and 2 forms (eg "-l -t" but also "-lt")
- management of multiple options: correct display.
Did the work pass all the checks? If not, evaluation stops here.
Yes
No
- nonexistent file / directory
- inaccessible file / directory
- unmanaged or non-existent option
Did the work pass all the checks? If not, evaluation stops here.
Yes
No