After some lovely feedback from Sotiris Tsimbonis on my last post Find and delete old files in linux I have a better (faster) way to delete files.

Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.

The old way …

`After some lovely feedback from Sotiris Tsimbonis on my last post Find and delete old files in linux I have a better (faster) way to delete files.

Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.

The old way …

`

The better faster way

``After some lovely feedback from Sotiris Tsimbonis on my last post Find and delete old files in linux I have a better (faster) way to delete files.

Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.

The old way …

`After some lovely feedback from Sotiris Tsimbonis on my last post Find and delete old files in linux I have a better (faster) way to delete files.

Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.

The old way …

`

The better faster way

``

And lets see the creation loop with xargs since we are talking about squeezing a tad more performance out of things.

The standard for loop …


<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
`After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
` 
  
The better faster way
  
``After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
`After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
` 
  
The better faster way
  
`` 
  
And lets see the creation loop with xargs since we are talking about squeezing a tad more performance out of things.
  
The standard for loop &#8230;
  

And the better faster xargs way


<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
`After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
` 
  
The better faster way
  
``After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
`After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
` 
  
The better faster way
  
`` 
  
And lets see the creation loop with xargs since we are talking about squeezing a tad more performance out of things.
  
The standard for loop &#8230;
  
```After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
`After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
` 
  
The better faster way
  
``After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
`After some lovely [feedback][1] from [Sotiris Tsimbonis][2] on my last post [Find and delete old files in linux][3] I have a better (faster) way to delete files.<!--more-->

<!--adsense-->


  
Spawning processes is expensive, its much better to not spawn a new process if its not needed. Just for proof I created 100 empty files in a temp directory and deleted them both ways.
  
The old way &#8230;
  
` 
  
The better faster way
  
`` 
  
And lets see the creation loop with xargs since we are talking about squeezing a tad more performance out of things.
  
The standard for loop &#8230;
  
``` 
  
And the better faster xargs way