Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    Why should this be faster than rm -rf Commented Nov 29, 2022 at 16:55
  • If you have ~100k files in a folder, ‘rm -rf’ would take some time to complete. ‘mv folder /tmp/folder’ would take less than 3 seconds. Commented Nov 30, 2022 at 17:25
  • you are cheating. You need to consider the time to restart as well. Similarly, you could enter a cron job and claim its faster as it requires no time at all (at the moment at least) Commented Nov 30, 2022 at 21:19
  • Why downvote? It's not cheating, /tmp is just a convenient example, because it exists on all *nix platforms. You can create a TMPFS and just remount it, and it's just the same without restarting. Commented Dec 1, 2022 at 8:12
  • Because I have serious doubts that it's faster. Your benchmark does not account for the time necessary for the restart. On my system the restart is ~3 minutes - which is well above the 30s. Commented Dec 1, 2022 at 15:24