Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use ranger

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces "how to use ranger" in detail, the content is detailed, the steps are clear, and the details are handled properly. I hope this "how to use ranger" article can help you solve your doubts.

It runs in the terminal window and allows you to press the arrow key below to navigate. It provides a multi-level file display that makes it easy for you to see where you are, move through the file system, and select specific files.

To install ranger, use standard installation commands (for example, sudo apt install ranger). To start it, just type ranger. It has a long, very detailed manual page, but it's easy to get started with ranger.

The display mode of ranger

The most important thing you need to get used to right now is the way ranger files are displayed. Once you start ranger, you will see four columns of data. The first column is one level above where you start ranger. For example, if you start with home directories, ranger will list all home directories in the first column. The second column will display the first screen contents of the directories and files in your home directory (or the directory where you started).

The key here is to go beyond any habits you may have and treat the details shown in each line as relevant. All entries in the second column are related to a single entry in the first column, and the content in the fourth column is related to the file or directory selected in the second column.

Unlike the normal command line view, directories will be listed first (in alphabetical order) and files will be listed in second place (also alphanumeric). Starting with your home directory, the display might look like this:

Shs@dragonfly / home/shs/backups # files listing in selected in each of files in home directory selected directory

The top line of the ranger shows you where it is. In this example, the current directory is / home/shs/backups. We see empty highlighted because there are no files in this directory. If we press the arrow key below to select bin, we will see a list of files:

Shs@dragonfly / home/shs/bin capnemo Desktop 0 extractshark Documents 0 finddupsshs Downloads 1 fix ^ | homes directories # files listing in selected in each of files in home directory selected directory

The highlighted entry in each column shows the current selection. Use the right arrow keys to move to a deeper directory or view the contents of the file.

If you continue to press the arrow keys to move to the file section of the list, you will notice that the third column will show the file size (not the number of files). The current selection line also displays the currently selected file name, while the rightmost column displays the contents of the file as much as possible.

Shs@dragonfly / home/shs/busy_wait.c waiteel camper.jpg 5.55m * it's used to show ASLR, and that's itnemo check_lockscreen 80B * / shark chkrootkit-output 438B # include ^ | homes files sizes file content

Some file and directory details are displayed at the bottom line of the display:

-rw-rw-r-- shs shs 338B 2019-01-05 14:44 1.52G, 365G free 67 Universe 488 11%

If you select a directory and press enter, you will enter the directory. Then, the leftmost column in your display will be a list of the contents of your home directory, and the second column will be a list of files in that directory. Then you can check the contents of the subdirectory and the contents of the file.

Press the left arrow key to move up one level.

Press Q to exit ranger.

Can you press to make a change? Key to pop up a help line at the bottom of the screen. It should look like this:

View [m] an page, [k] ey bindings, [c] commands or [s] ettings? (press q to abort)

Press c and ranger will provide you with command information that you can use within the tool. For example, you can change the permissions of the current file by typing: chmod, followed by the expected permissions. For example, once you have selected a file, you can enter: chmod 700 to set permissions to rwx--.

Input: edit can open the file in nano, allowing you to modify it, and then use the nano command to save the file.

After reading this, the article "how to use ranger" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report