Working with Text and Files

By now you’re pretty comfortable creating and manipulating files and folders from the CLI. But with some additional tools, you can solve more complex problems while building on the skills you’ve already learned.

Managing Files with ranger

ranger is a terminal-based graphical file manager. While this book is all about working on the command line, ranger makes it easier to work with files in batches, and it also makes previewing files a breeze. To use it, you first need to install it. On Ubuntu, use apt:

 $ ​​sudo​​ ​​apt​​ ​​install​​ ​​ranger

On macOS, use brew:

 $ ​​brew​​ ​​install​​ ​​ranger

Then execute the following command to generate ranger’s default configuration, which will be stored in ~/.config/ranger ...

Get Small, Sharp Software Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.