Skip to content

MAGANER/l

Repository files navigation

l

Alternative to ls classical application
(I made everything i wanted, so i think i won't do anything with repo for now, but it's still open for contributions) ((So... I still work on this application, because i find out many useful features as time goes on))

Output customization

In ~/.config/ .lconfig file is created at first run of program
and it contains data about colors and number of element per line for table output.

Default keys

If you want to always show specific information, then you can edit your .bashrc file and simply add alias.
For example, you want to see total number of elements in directory everytime you run l - use alias l="l -n ".

How to build

Linux

git clone --recursive https://github.com/MAGANER/l.git
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make
chmod +x l

Windows

Download build from release page or follow next commands

git clone --recursive https://github.com/MAGANER/l.git
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
#then you open .sln file and build this program

Note about regular expression support

Let's imagine you want to list all txt files in current dir, so you might think to use l *.txt
, and after you type this command nothing happens. You need to use l .*.txt, because you can use "real"
regexes to sort apllication's output.

help page

Overall, this program is dedicated to show directory's content and its properties.
It can show file/dir permissions, size, creation and modification time.

It has 3 different modes of output: list, table, tree.
All properties are shown in list mode, so if you wanna show size of files in tree mode,
than program will be forced to print all requested data in list mode.

To see all files and dirs just type l without any flags.

If you don't provide any path as argument, l will show content of current dir,
otherwise it will show content of provided directory.

Usage

Common examples

$ l
$ l -flag1 -flagn

Particular examples

$ l ~/notes/.*.txt -f print all txt files in notes dir
$ l ../ -d print only subdirectories
$ l file print all properties related to file(creation/modification time, permissions, size

List of flags:
-d show only directories
-f show only files
-s sort output( -d -f and -f -d are two ways to manage sorted output)
-r recursivly walk through directory
-p show permissions of files/dirs
-T show modification time
-C show creation time
-S show size of each file in directory
-l show as list(by default)
-m show as table
-t show as tree
-a show all information(permissions, size, creation/modification time)
-P print without colorizing, use standard color codes
-h print help page and break program execution
-n print total number of elements in directory