LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lsd

Modern ls replacement with colors and icons

TLDR

List files in the current directory
$ lsd
copy
List with long format details
$ lsd -l
copy
List all files including hidden
$ lsd -la
copy
Display as a tree with depth limit
$ lsd --tree --depth [3]
copy
Sort by file size in reverse order
$ lsd -lS --reverse
copy
List with git status indicators
$ lsd -l --git
copy
Group directories first in long format
$ lsd -l --group-directories-first
copy
List with total directory sizes
$ lsd -l --total-size
copy

SYNOPSIS

lsd [options] [files...]

DESCRIPTION

lsd (LSDeluxe) is a modern replacement for the `ls` command written in Rust. It adds colors, file-type icons, and tree view to directory listings while remaining compatible with standard `ls` flags.The tool supports Nerd Font icons for visual file-type identification, git integration to display repository status alongside files, and extensive customization through a YAML configuration file.

PARAMETERS

FILES

Files or directories to list. Defaults to current directory.
-a, --all
Include hidden files (starting with `.`).
-A, --almost-all
Include hidden files but exclude `.` and `..`.
-l, --long
Display extended file metadata in long format.
-1, --oneline
Display one entry per line.
-R, --recursive
Recurse into directories.
--tree
Display directory contents as a tree structure.
--depth num
Limit the depth of recursion (used with `--tree` or `-R`).
-t, --timesort
Sort by modification time.
-S, --sizesort
Sort by file size.
-X, --extensionsort
Sort by file extension.
-v, --versionsort
Natural sort of version numbers within filenames.
--sort WORD
Sort by: size, time, version, extension, or git.
-r, --reverse
Reverse the sort order.
-U, --no-sort
Do not sort; list entries in directory order.
--git
Show git status for listed files and directories.
--color WHEN
Control color output: always, auto, or never (default: auto).
--icon WHEN
Control icon display: always, auto, or never (default: auto).
--icon-theme THEME
Icon theme: fancy or unicode (default: fancy).
--group-dirs VALUE
Group directories: none, first, or last.
--group-directories-first
List directories before files (shorthand for `--group-dirs=first`).
--date FORMAT
Date display format: date, locale, relative, or a custom format string.
--size FORMAT
Size display format: default, short, or bytes.
--permission FORMAT
Permission display format: rwx, octal, attributes, or disable.
--total-size
Display total size of directories, not just immediate entry count.
--blocks BLOCKS
Choose displayed columns: permission, user, group, size, date, name, inode, git.
--header
Display column headers.
-d, --directory-only
List directories themselves, not their contents.
-i, --inode
Show the inode number for each file.
-L, --dereference
Show information for the target of symlinks.
--no-symlink
Do not display symlink target information.
-F, --classify
Append indicator characters to entries (`*/=>@|`).
--hyperlink WHEN
Attach hyperlinks to filenames: always, auto, or never.
-I, --ignore-glob PATTERN
Hide entries matching a glob pattern.
--classic
Enable classic mode (no colors or icons, like plain ls).
--config-file PATH
Use a custom configuration file.
--ignore-config
Ignore the configuration file and use defaults.
-N, --literal
Print entry names without quoting.
-Z, --context
Display SELinux or SMACK security context.

CONFIGURATION

~/.config/lsd/config.yaml

User configuration file in YAML format for setting default options, colors, icons, and display preferences.

CAVEATS

A Nerd Font must be installed and configured in the terminal for icons to render correctly. Without it, icons may appear as empty boxes or question marks. The `--classic` flag disables icons and colors for compatibility. Terminal must support 256 colors or truecolor for full color output.

HISTORY

lsd (LSDeluxe) was created as a modern, colorful Rust-based replacement for the traditional `ls` command. It draws inspiration from similar tools like `exa` and `eza`.

SEE ALSO

ls(1), exa(1), eza(1), tree(1)

Copied to clipboard
Kai