2021-10-07 19:39:46 +02:00
|
|
|
# lsd
|
|
|
|
|
|
|
|
> List directory contents.
|
|
|
|
> The next generation `ls` command, written in Rust.
|
|
|
|
> More information: <https://github.com/Peltoche/lsd>.
|
|
|
|
|
|
|
|
- List files and directories, one per line:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd {{[-1|--oneline]}}`
|
2021-10-07 19:39:46 +02:00
|
|
|
|
|
|
|
- List all files and directories, including hidden ones, in the current directory:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd {{[-a|--all]}}`
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2024-09-21 19:15:16 +02:00
|
|
|
- List files and directories with trailing `/` added to directory names:
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd {{[-F|--classify]}}`
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2024-09-21 19:15:16 +02:00
|
|
|
- List all files and directories in long format (permissions, ownership, size in human-readable format, and modification date):
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd {{[-lha|--long --human-readable --all]}}`
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2024-09-21 19:15:16 +02:00
|
|
|
- List files and directories in long format, sorted by size (descending):
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd {{[-lS|--long --sizesort]}}`
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2024-09-21 19:15:16 +02:00
|
|
|
- List files and directories in long format, sorted by modification date (oldest first):
|
2021-10-07 19:39:46 +02:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd {{[-ltr|--long --timesort --reverse]}}`
|
2021-10-07 19:39:46 +02:00
|
|
|
|
|
|
|
- Only list directories:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd {{[-d|--directory-only]}} {{*/}}`
|
2024-09-21 19:15:16 +02:00
|
|
|
|
|
|
|
- Recursively list all directories in a tree format:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`lsd --tree {{[-d|--directory-only]}}`
|