Forrest logo
back to the lsd tool

lsd:tldr:a5be1

lsd: List all files and directories in long format, sorted by size (descending).
$ lsd -lS
try on your machine

The command "lsd -lS" is composed of two parts: "lsd" and "-lS".

  1. "lsd" is the actual command, which stands for "list directory" in Linux and Unix-based systems. It is used to display the contents of a directory, i.e., the files and directories within it.

  2. "-lS" are the command-line options (or flags) that modify the behavior of the "ls" command:

    • "-l" (long format): This option displays the detailed information about each file and directory, such as permissions, owner, size, modification time, etc., in a long listing format. It provides more detailed information than the default output of "ls".

    • "-S" (sort by size): This option specifies that the contents of the directory should be sorted by file size. By default, "ls" sorts the files alphabetically.

So, when you execute the command "lsd -lS", it will list the contents of the current directory in a long listing format, with the files and directories sorted in descending order based on their sizes. The larger files will be displayed first.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lsd tool