How to reduce the use of CD command through autojump command in Linux

Time:2021-1-13

Linux – reduce the use of CD command through autojump command

1. Install autojump


git clone git://github.com/joelthelion/autojump.git

install


cd autojump
./install.py

uninstall


cd autojump
./uninstall.py

2. Solve the problem of bashrc file


cd ~

Open the bashrc file


vim ~/.bashrc

Append a line at the end of the file


xxxxxxxxxxx 

This line of code when you install, the software will prompt you, you copy up on the line

Then execute


source ~/.bashrc

3. Often go to a few directory, first CD again

在这里插入图片描述

Then use the command to view the weight of these directories


j --stat

The number in front of the path is the weight value of the path. If the weight value is high, if you find more than one, you have priority to go in

4. Quick jump

在这里插入图片描述

adoptj sShort can quickly enter a common directory

The operation is much faster than the file manager of UI page

5. Others

1. Support fuzzy matching

2. J — purge all weights

3. View the contents of the data file


cat /root/.local/share/autojump/autojump.txt

So far, this article about how to reduce the use of CD by using autojump in Linux is introduced. For more information about how to reduce the use of CD by using autojump in Linux, please search previous articles of developer or continue to browse the following articles. I hope you can support developer more in the future!