Forrest logo
back to the du tool

du:ai:a7dc2

get size of directory in kilobytes
$ du -s ${directory-name} | cut -f1
try on your machine

This command will retrieve the size of the directory in kilobytes by using the 'du' command to calculate disk usage, and then extracting the size value using 'cut'.

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:

  • get size of directory in kilobytes?
back to the du tool