Given my fondness for the console and for bare-bones window managers like
ratpoison, I’m always pleased when I find another neat console tool. This time it was Ranger (hat-tip to K.Mandla), an ncurses-based file manager.
The ncurses-based file manager Ranger is a console tool worth checking out and taking the time to learn.
Unfortunately, Ranger doesn’t seem to be available as a package for Debian or Ubuntu, but it can be downloaded and installed from the project page. It looks a little weird when you first run it; it took me a moment to work out which subdirectory my cursor was actually in. However, hitting the arrow keys a bit clarifies what’s going on.
|Ranger in Action|
The second column from the right is the directory that you’re currently navigating within. You can use the arrow keys, or the hjkl keys (as with Vim) to move up and down within the directory, or to move left or right to a higher
or lower directory level. (Since it’s ncurses-based, you can also use the mouse.) The columns on the left show higher directory levels; the column on the right is a sneak peak at the contents of the currently highlighted subdirectory.
What I really like is that when you get to the final leaf of any directory tree — a file — you can then open that file. Text files open automatically in your preferred editor; If you try to open another file, Ranger will ask you for a program to use to open it.
Ranger can do a lot more than this — hit “?” for excellent online help that
summarizes what you can do with files and directories. “4?” gives you the various
file operations available, such as “:delete” to delete the highlighted file.
You can also mark a bunch of files with space, then delete them all.
Ranger is a neat option if you regularly use the console and would like a slightly more user-friendly option for file management than ls and the other shell builtins. I’ll certainly be using it again.
Juliet Kemp has been messing around with Linux systems, for financial reward and otherwise, for about a decade. She is also the author of “Linux System Administration Recipes: A Problem-Solution Approach” (Apress, 2009).