Linux ls Command Implementation in Rust
This project aims to recreate the familiar ls command found in Linux using the Rust programming language. The goal is to provide a feature-rich and efficient alternative to the standard ls command while leveraging the power and safety of Rust.
- 📂 Directory listing: Display file and directory names in a specified directory.
⚠️ Error handling : Provide meaningful error messages and handle exceptional cases gracefully.
- 🎨 Color-coded output: Enhance readability and visual appeal by using colors to differentiate file types.
- 🗃️ Sorting options: Sort files and directories based on various criteria such as name, size, or modification time.
- 🏁 Command-line flags: Support different options and flags to customize the behavior of the ls command.
- 📚️ Documentation: Thoroughly document the code to aid maintainability and future contributions.
- 🚀 Performance optimization: Optimize the implementation for efficient execution, even with large directory structures.
To get started with the project, follow these steps:
git clone https://github.com/truthixify/rust-ls.git
cd ls-rust
cargo build
cargo run [directory_path]
Replace directory_path
with the path of the directory you want to list. If no directory is specified, the current directory will be used.
Explore the available command-line options and flags:
cargo run --help
Contributions to this project are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make the necessary changes and commit them.
- Push your branch to your forked repository.
- Submit a pull request to the main repository.
Note Please ensure that your code follows the project's coding style and conventions. Additionally, consider writing tests for any new functionality or modifications.
This project is licensed under the MIT License.
This project was inspired by the original ls command found in Linux. We appreciate the efforts of the developers and contributors of the Linux operating system.
If you have any questions or suggestions regarding this project, please feel free to contact truthixify at truthixify@gmail.com.
Happy coding! 🚀