<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: How to Delete Large Directory with Thousands of Files in Linux	</title>
	<atom:link href="https://www.tecmint.com/delete-large-directory-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/delete-large-directory-linux/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Thu, 13 Jul 2023 16:32:59 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Kingneutron		</title>
		<link>https://www.tecmint.com/delete-large-directory-linux/comment-page-1/#comment-2012980</link>

		<dc:creator><![CDATA[Kingneutron]]></dc:creator>
		<pubDate>Thu, 11 May 2023 14:10:13 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=51010#comment-2012980</guid>

					<description><![CDATA[If it took *84 minutes* to touch 500k 0-byte files, you&#039;re doing something wrong.

On a 2011 core-i5 iMac with OSX High Sierra 10.13 running against a Firewire-800 spinning disk with APFS filesystem:
&lt;pre&gt;
$ time echo {1..100000} &#124;xargs -P 2 -n 1 touch
&lt;/pre&gt;
# Parallel process 2x / time

Begin:
Thu May 11 09:01:03 CDT 2023
real    1m47.971s

user    1m11.711s
sys     1m44.261s
Thu May 11 09:02:51 CDT 2023
End

xargs ~30% CPU, 
Terminal ~20% cpu - and you can also preface the create command with &#039;&lt;strong&gt;nice&lt;/strong&gt;&#039;.

As for deleting a directory with thousands of files, I&#039;d argue the *safest* way to do so would be to use &lt;strong&gt;Midnight Commander&lt;/strong&gt;. Navigate to the directory, hit &lt;code&gt;F8&lt;/code&gt;, and it asks for confirmation, no unexpected results.]]></description>
			<content:encoded><![CDATA[<p>If it took *84 minutes* to touch 500k 0-byte files, you&#8217;re doing something wrong.</p>
<p>On a 2011 core-i5 iMac with OSX High Sierra 10.13 running against a Firewire-800 spinning disk with APFS filesystem:</p>
<pre>
$ time echo {1..100000} |xargs -P 2 -n 1 touch
</pre>
<p># Parallel process 2x / time</p>
<p>Begin:<br />
Thu May 11 09:01:03 CDT 2023<br />
real    1m47.971s</p>
<p>user    1m11.711s<br />
sys     1m44.261s<br />
Thu May 11 09:02:51 CDT 2023<br />
End</p>
<p>xargs ~30% CPU,<br />
Terminal ~20% cpu &#8211; and you can also preface the create command with &#8216;<strong>nice</strong>&#8216;.</p>
<p>As for deleting a directory with thousands of files, I&#8217;d argue the *safest* way to do so would be to use <strong>Midnight Commander</strong>. Navigate to the directory, hit <code>F8</code>, and it asks for confirmation, no unexpected results.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/delete-large-directory-linux/comment-page-1/#comment-2011942</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Tue, 09 May 2023 03:47:08 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=51010#comment-2011942</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/delete-large-directory-linux/comment-page-1/#comment-2011709&quot;&gt;Andreas Dorfer&lt;/a&gt;.

@Andreas,

Could you share one example, of how the find/exec rm method is a valid solution for this? It would be a great help for all Linux users...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/delete-large-directory-linux/comment-page-1/#comment-2011709">Andreas Dorfer</a>.</p>
<p>@Andreas,</p>
<p>Could you share one example, of how the find/exec rm method is a valid solution for this? It would be a great help for all Linux users&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andreas Dorfer		</title>
		<link>https://www.tecmint.com/delete-large-directory-linux/comment-page-1/#comment-2011709</link>

		<dc:creator><![CDATA[Andreas Dorfer]]></dc:creator>
		<pubDate>Mon, 08 May 2023 18:37:46 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=51010#comment-2011709</guid>

					<description><![CDATA[This will not work on directories with a large number of files, where the shell (like &lt;strong&gt;bash&lt;/strong&gt;) runs out of memory. There the &lt;strong&gt;find&lt;/strong&gt;/&lt;strong&gt;exec&lt;/strong&gt; &lt;strong&gt;rm&lt;/strong&gt; method is a valid solution.]]></description>
			<content:encoded><![CDATA[<p>This will not work on directories with a large number of files, where the shell (like <strong>bash</strong>) runs out of memory. There the <strong>find</strong>/<strong>exec</strong> <strong>rm</strong> method is a valid solution.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Arulkumar.g		</title>
		<link>https://www.tecmint.com/delete-large-directory-linux/comment-page-1/#comment-2011642</link>

		<dc:creator><![CDATA[Arulkumar.g]]></dc:creator>
		<pubDate>Mon, 08 May 2023 16:14:39 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=51010#comment-2011642</guid>

					<description><![CDATA[Really very good article for deleting lakhs of files in a directory in Linux.]]></description>
			<content:encoded><![CDATA[<p>Really very good article for deleting lakhs of files in a directory in Linux.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
