Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    FreeBSD unresponsive after large rm -r * command

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    2 Posts 2 Posters 1.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mhab12
      last edited by

      The other day I found that our Sarg Reports folder had grown to takeover all available space on our box.  I uninstalled the package as we never used it and ran an 'rm' command from the console.  It finished in about an hour.  During that time I just left the box alone, and my shell cursor was at a blank line.  When the process finished, I got the regular prompt again.  Everything was good.

      Today I am working with a much larger data set on a Nas4Free box and had to delete a larger amount of files and folders (deduplicated data store from PHDVirtual Backup).  It's been running for a few hours now and the box is still unresponsive.  Is there a better way to delete millions of files en masse?  Should I expect that other services will freeze during this operation as they have now or is this normal in a BSD/*nix envinronment?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        rm is really the only way to do it, or using something else to pass data to rm (like find /somewhere -name "foo" -type f | xargs rm).

        If the system is blocking on I/O there may not be much you can do. If you can open multiple terminals, running 2+ rm's can sometimes be faster then one alone, but it's still bound by I/O limits on the drive.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.