lk is a powerful and user-friendly command-line tool for Windows, designed as an enhanced alternative to the standard dir
or ls
commands.
Note: This project is solely a personal experiment by itlwas and is not intended for continuous development. It serves as a proof-of-concept rather than a fully evolving product.
- Colorized Output: Easily distinguish file types with intuitive color coding.
- Detailed Information: Display file attributes, human-readable sizes, modification and creation times, and even file ownership.
- Advanced Sorting: Sort by name (with natural sorting), size, modification time, or extension, with support for reverse order.
- Directory Grouping: Optionally group directories for a clearer display.
- Recursive & Tree Views: Recursively list subdirectories or display a hierarchical tree view.
- File Filtering: Filter files by name using simple patterns.
- Summary Statistics: Get an overview of the number of directories, files, and total size.
- File Preview: Preview the first 10 lines of text files directly in the terminal.
- Full Path Display: Option to show the complete file path.
Note: The interactive mode feature has been removed due to low usage.
- Windows operating system.
- A C compiler such as MinGW-w64 or Visual Studio.
- Install MinGW-w64: Download and install from mingw-w64.org. Ensure its
bin
directory is added to your system'sPATH
. - Compile: Open a command prompt or PowerShell in the directory containing
lk.c
and run:gcc lk.c -o lk.exe
- Run: Execute
lk.exe
from the command line.
- Open Developer Command Prompt: Launch the "Developer Command Prompt for VS".
- Navigate to the Project Directory: Use
cd
to move to the directory containinglk.c
. - Compile: Run:
cl lk.c
- Run: Execute the compiled executable.
Run lk
from the command line with the desired options and directories:
lk [options] [directory ...]
If no directory is specified, lk
will list the contents of the current directory.
Usage: lk [options] [path ...]
Options:
-a, --all Show hidden files.
-s, --short Use short format (disable detailed long listing).
-R Recursively list subdirectories.
-S Sort by file size.
-t Sort by modification time.
-x Sort by file extension.
-r Reverse sort order.
-b, --bytes Display file sizes in raw bytes (default: human-readable).
-F Append file type indicators (e.g., "/" for directories, "@" for symlinks).
-d List directory entry itself rather than its contents.
-n, --no-group Do not group directories first.
-E Show file creation time.
-T Display a tree view of directory structure.
-N Disable natural sorting.
-P Show full file path.
-O Display file owner.
-M Show summary of directory contents.
-h, --help Display this help message.
-v, --version Display version information.
This project is licensed under the Unlicense. See the LICENSE file for details.
Made with ❤️ for Windows command-line enthusiasts. Enjoy!