-- Leo's gemini proxy

-- Connecting to darknesscode.xyz:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

Get the size of a specific directory in Linux


To get the actual size of a directory you need to run the *du* command (disk usage)


Examples


For a directory owner by user


du -sh Downloads

The output will be like


24G Downloads/

s - Display only the total size of the specified directory, do not display file size totals for subdirectories.

h - Print sizes in a human-readable format (h).


If the directory is owner by root


sudo du -sh /var

The output will be like


85G /var

For more option check man du


----------


Home

Linux

Notes

MicroLog


----------


© DarknessCode

-- Response ended

-- Page fetched on Tue May 21 21:55:00 2024