LF (List Files) is a simple Linux-style file explorer written in C. This project aims to recreate the functionality of the ls command. Currently, it supports:
- Basic file listing: When run without arguments, it prints file names.
- Long format listing (-l): When using the
-lflag, it prints a detailed file listing similar tols -l.
This is a work in progress, and more features will be added in the future.
- Lists files in a directory.
- Supports
-lflag for detailed file information. - Uses system calls to retrieve file details such as permissions, owner, group, size, and last modification time.
To compile the project, use gcc:
gcc main.c -o lfRun the program without arguments to list file names:
./lfUse the -l flag to print the long-formatted version:
./lf -lFor more details on how this works, check out this article: Building a Linux-Style File Explorer: Recreating the 'ls' Command in C