<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>manage disk space Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/manage-disk-space/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 21 Jun 2018 20:42:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to Find out The Biggest Files &#038; Directory on Linux</title>
		<link>https://www.osradar.com/how-to-find-out-the-biggest-files-directory-on-linux/</link>
					<comments>https://www.osradar.com/how-to-find-out-the-biggest-files-directory-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Thu, 17 May 2018 04:26:55 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[directory size]]></category>
		<category><![CDATA[file size]]></category>
		<category><![CDATA[largest directory on linux]]></category>
		<category><![CDATA[largest files on linux]]></category>
		<category><![CDATA[linux disk space]]></category>
		<category><![CDATA[manage disk space]]></category>
		<category><![CDATA[sort file size]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=3133</guid>

					<description><![CDATA[<p>For every Linux system admin, storage is a big issue. It’s especially true when you’re running a server machine where storage can become a big factor. It’s necessary to manage the directories so that enough storage space is available whenever needed. Everyday users can also easily manage their directory for ensuring the best performance and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-find-out-the-biggest-files-directory-on-linux/">How to Find out The Biggest Files &#038; Directory on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>For every Linux system admin, storage is a big issue. It’s especially true when you’re running a server machine where storage can become a big factor. It’s necessary to manage the directories so that enough storage space is available whenever needed. Everyday users can also easily manage their directory for ensuring the best performance and available disk space. Let’s take a look how to find out the largest directories and files under Linux.</p>
<p>The command tool</p>
<p>We’ll be using 2 tools today – “du” and “find”. “du” will show you the biggest directories under your system whereas “find” will show the largest files available on the disk.</p>
<h3>Finding the largest directory</h3>
<p>At first, let’s start with directory. Run this command for finding out the largest directory under “/home” partition.</p>
<pre>du -a /home | sort -n -r | head -n 10</pre>
<p><img loading="lazy" class="size-full wp-image-3135 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/file-size-1.png" alt="" width="1184" height="289" srcset="https://www.osradar.com/wp-content/uploads/2018/05/file-size-1.png 1184w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-1-300x73.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-1-768x187.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-1-1024x250.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-1-696x170.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-1-1068x261.png 1068w" sizes="(max-width: 1184px) 100vw, 1184px" /></p>
<p>Let’s explain the details of the command:</p>
<ul>
<li>du – Estimates the space usage of directory.</li>
<li>a – Display all the files &amp; folders</li>
<li>sort – Sort text file lines</li>
<li>-n – Compare according to the numeric value of string</li>
<li>-r – Reverse the comparison(s) result</li>
<li>head – Output the first file part</li>
<li>-n (under “head” part) – Print N number of lines on the screen.</li>
</ul>
<p>For searching and finding out the largest directory in the entire, run this command:</p>
<pre>du -a | sort -n -r | head -n 5</pre>
<p><img loading="lazy" class="size-full wp-image-3136 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/file-size-2.png" alt="" width="1184" height="311" srcset="https://www.osradar.com/wp-content/uploads/2018/05/file-size-2.png 1184w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-2-300x79.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-2-768x202.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-2-1024x269.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-2-696x183.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-2-1068x281.png 1068w" sizes="(max-width: 1184px) 100vw, 1184px" /></p>
<p>The size of the files/folders will be shown in bytes. If you want human readable form like KB, MB or GB etc. then run this command line:</p>
<pre>du -hs * | sort -rh | head -10</pre>
<p><img loading="lazy" class="size-full wp-image-3137 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/file-size-3.png" alt="" width="1185" height="339" srcset="https://www.osradar.com/wp-content/uploads/2018/05/file-size-3.png 1185w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-3-300x86.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-3-768x220.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-3-1024x293.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-3-696x199.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-3-1068x306.png 1068w" sizes="(max-width: 1185px) 100vw, 1185px" /></p>
<p>Here, &#8220;-h&#8221; argument will tell to show human readable form. You can also add the argument in the previous commands.</p>
<h3>Finding out the top file sizes</h3>
<p>If you’re interested only the top file sizes of your system, then use this command:</p>
<pre>find -type f -exec du -Sh {} + | sort -rh | head -n 5</pre>
<p><img loading="lazy" class="size-full wp-image-3138 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/file-size-5.png" alt="" width="1187" height="298" srcset="https://www.osradar.com/wp-content/uploads/2018/05/file-size-5.png 1187w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-5-300x75.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-5-768x193.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-5-1024x257.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-5-696x175.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/file-size-5-1068x268.png 1068w" sizes="(max-width: 1187px) 100vw, 1187px" /></p>
<p>If you’re in need of searching the largest files in a specific directory, then follow this structure:</p>
<pre>find ~/Downloads/ -type f -exec du -Sh {} + | sort -rh | head -n 5

OR

find ~/Downloads/ -type f -printf "%s %p\n" | sort -rn | head -n 5</pre>
<p>Voila! The largest file(s)/directory(s) are discovered! Make changes accordingly to suit your needs. If your system is clogged with piles of images or small files, consider <a href="https://www.osradar.com/how-to-compress-and-decompress-files-on-linux/">compressing them into a single archive</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-find-out-the-biggest-files-directory-on-linux/">How to Find out The Biggest Files &#038; Directory on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-find-out-the-biggest-files-directory-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
