Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at ranger. It’s a tool that allows you to easily browse files in a terminal window, but in a much different manner than you normally would on the command line. To start it, type “ranger”:
It starts by showing you’re a 4-column display. Assuming you start it from your home directory, it would look something like this:
• Column 1 = home directories (one level below where you started it)
• Column 2 = directories your home directory (followed by files)
• Column 3 = number of files in the directory or size of the file (or file sizes)
• Column 4 = contents of the currently selected directory or, if text file, its contents
When you start, the current selection will be the first directory in your home. You can move down the list with arrow keys or you select one by clicking on it.
Press enter to go into a directory and left arrow to back up.
If I move into my bin directory and then arrow down to some particular file, I will see its contents on the far right – assuming the file is a text file.
Select bin, enter, select calc_power.c => shows file contents – source code in c.
At any point, press q to quit
You can do other things with ranger like open a file to edit it or change its permissions. I hope this intro will encourage you to take a look at this tool.
That’s your Linux tip for ranger.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.
previous post