Skip to content
/ rls Public

A rust based implementation of the ls utility in Unix-like operating systems

Notifications You must be signed in to change notification settings

morukele/rls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rls

A Rust implementation of the classic Unix ls command.

Project Overview

rls aims to recreate the functionality of the ls command using Rust. This project serves as a learning exercise.

Note: This is a project for personal studies on how the file system API in rust functions.

Features

The goal is to implement the following ls options:

  • rls: List all non-hidden files and directories in the current directory
  • rls -a: List all files and directories, including hidden ones
  • rls -A: List all files and directories except . and ..
  • rls -l: Use long listing format
  • rls -h: Print sizes in human-readable format (e.g., 1K, 234M, 2G)
  • rls -R: List subdirectories recursively
  • rls -d: List directories themselves, not their contents
  • rls -r: Reverse order while sorting
  • rls -S: Sort by file size, largest first
  • rls -t: Sort by modification time, newest first
  • rls -X: Sort alphabetically by entry extension

The implementation supports argument chaining. So you can use the command

rls -a -h -X

to list all files and directories sorted alphabetically and in a human readible format.

About

A rust based implementation of the ls utility in Unix-like operating systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages