In this short video, I give a quick overview of my custom ls implementation in C! 🚀
Playlist:
• 🚀 Implementing the ls Command in C
🔹 What is my_ls?
It’s a custom-built command-line tool that mimics the behavior of ls, listing directory contents with support for:
✅ Basic listing (one-column format like ls -1)
✅ Hidden files (-a) → Shows files starting with .
✅ Sorting by modification time (-t)
✅ Handling multiple directories and sorting correctly
✅ Error handling for invalid paths
💡 How It Works Internally:
Uses opendir(), readdir(), and lstat() to retrieve file details
Stores metadata in structs, then sorts files alphabetically or by time
Handles segmentation faults & memory issues with proper debugging
🔧 Future Enhancements:
-r for reverse sorting
Recursive listing (-R)
Long format (-l) with file permissions
Color support (ls --color)
🎯 Want to see the full implementation? Check out my GitHub repository! 🔗
https://github.com/Cukowski/My_Ls_Tut...