<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Linux/macOS - Shell - List directory sizes ... - Linux Software				            </title>
            <link>https://www.tweaking4all.com/forum/linux-software/linux-macos-shell-list-directory-sizes/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 15 Jul 2026 20:03:09 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Linux/macOS - Shell - List directory sizes ...</title>
                        <link>https://www.tweaking4all.com/forum/linux-software/linux-macos-shell-list-directory-sizes/#post-4910</link>
                        <pubDate>Wed, 10 May 2023 10:32:34 +0000</pubDate>
                        <description><![CDATA[How does one list all directories, and see the space each directory takes up on your disk, in a given directory?
I rarely need this, but I do find myself having to Google it each time I do ...]]></description>
                        <content:encoded><![CDATA[<p>How does one list all directories, and see the space each directory takes up on your disk, in a given directory?</p>
<p>I rarely need this, but I do find myself having to Google it each time I do ... <br />So for my own reference, and maybe for others as well:</p>
<p>(works in a Linux Shell or macOS Terminal)</p>
<pre contenteditable="false">du -sh /path/to/directory/*</pre>
<p>This will list all directory in "/path/to/directory/", with it's size.</p>
<p>For example:</p>
<pre contenteditable="false">~ $ du -sh /Users/username/*                                                                                                              12:25
 30M	/Users/username/Applications
1.3M	/Users/username/Applications (Parallels)
 24M	/Users/username/Creative Cloud Files
1.1G	/Users/username/Desktop
235G	/Users/username/Documents
 18G	/Users/username/Downloads
 12K	/Users/username/Fusion 360
129G	/Users/username/Library
144K	/Users/username/Movies
 1M	/Users/username/Music
1.3M	/Users/username/untitled folder</pre>
<p><br /><em>Explanation</em><br /><br />"<strong>du</strong>" (disk usage) command estimates the space usage. Note: only for directories you have access to!!!<br />The <a href="https://linuxcommandlibrary.com/man/du" target="_blank" rel="noopener">Linux Man page</a> and <a href="https://ss64.com/osx/du.html" target="_blank" rel="noopener">Apple man page</a> can give you more details.</p>
<p>The options we use here: -sh</p>
<p><strong>-s</strong>, --summarize; display only a total for each argument<br /><br /><strong>-h</strong>, --human-readable; print sizes in human readable format (e.g., 1K 234M 2G)<br /><br />Optional:<br /><strong>-c</strong>, --total; produce a grand total</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/linux-software/">Linux Software</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/linux-software/linux-macos-shell-list-directory-sizes/#post-4910</guid>
                    </item>
							        </channel>
        </rss>
		