Forrest logo
back to the du tool

du:ai:78c44

show files by size in gb
$ du -h --max-depth=1 | sort -rh | grep -E '^${0-9.}+G'
try on your machine

This command will list all files and directories in the current directory and its subdirectories, sorted by size in gigabytes (GB).

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.

Questions that are answered by this command:

  • show files by size in gb?
back to the du tool