I rarely ever open a topic on the Garuda forum, but I felt compelled to do so today. I figured I needed to give a plug to one of the most underappreciated apps in all of Linuxdom. Midnight Commander is an old school dual pane Terminal User Interface (TUI) File manager in the style of Norton Commander. You’ve probably never heard of that program unless you started your computing career on a monochrome monitor, (yes that’s a thing, you can google it). Despite it’s dated appearance Midnight Commander is still one of the most powerful file managers in existence. You may think this is sheer hyperbole, but I kid you not.
Midnight Commander (MC) has saved my a$$ more times than I can count in many different ways. Now that Garuda uses snapper I figured it was finally time to clear out years of old TimeShift backups. I started out trying to delete the backups using Dolphin’s “Root Actions” plugin, with zero luck. Every time I tried to delete one of the top level directories I’d get an error that some deeply nested file couldn’t be deleted, (and there were lots of them). Even when I located the offending files and attempted to remove each file individually Dolphin still couldn’t delete them using root perms. So, I gave up on that idea before too long as Dolphin was basically useless.
My next attempt was with using the Konsole terminal emulator. If I tried to delete some of the topmost directories using Konsole, it still errored out. However, If I drilled down to the directory that contained one of the problematic files, I could delete that single directory using the terminal. It took me quite a long time to simply delete one days worth of saved backups using Konsole, and there were years of backups stored there. I quickly realized it would take a month of Sundays to purge the backups at this rate and gave up using Konsole in frustration.
I figured my last option before attempting to delete the backups using a rescue disk from a live environment was to put Midnight Commander to the test. Well as you might have guessed from my glowing tribute earlier, Midnight Commander has proved its easily up to the task. Midnight Commander successfully deleted over 1.7 million files and recovered over 1TB of space without a single error. This is by no means a one off, many times in the past MC has managed to accomplish tasks that seemed impossible using other methods. The surprising part is that even though MC runs in the terminal it is almost as easy to use as any modern GUI file explorer. MC has full mouse support and can traverse directories upwards and downwards with a double click. Midnight Commander even has its own powerful built in text editor, so if your system won’t boot properly MC is usually the only tool you’ll need to repair your system.
It never ceases to amaze me at how easily MC handles tasks that many standard tools choke on. MC looks a little outdated at first glance, but you can always spruce her up with a different skin to improve the looks. I usually launch MC with a blue skin for a limited user, and use a red skin when operating as root for an added margin of safety. That way it’s always readily apparent when you’re running as root. Enter sudo mc
in your terminal to launch Midnight Commander as root, a simple mc
will do to start Midnight Commander as a limited user.
Give Midnight Commander a try and you may be very pleasantly surprised at how effortless managing files in the terminal can be.