当前位置 博文首页 > Linux 通过 autojump 命令减少 cd 命令的使用的实现方法

    Linux 通过 autojump 命令减少 cd 命令的使用的实现方法

    作者:简简单单OnlineZuozuo 时间:2021-01-31 21:00

    Linux - 通过 autojump 命令减少 cd 命令的使用

    1、安装 autojump

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

    安装

    cd autojump
    ./install.py

    卸载

    cd autojump
    ./uninstall.py

    2、解决 bashrc 文件问题

    cd ~

    打开 bashrc 文件

    vim ~/.bashrc

    在文件的最后 追加一行

    xxxxxxxxxxx 

    这行代码在你安装的时候, 软件会提示你的,你复制上去就行

    然后执行

    source ~/.bashrc

    3、经常去的几个目录,先cd 一遍

    在这里插入图片描述

    然后通过命令查看这些目录的权重

    j --stat

    路径前面的数字,就是这个路径的权重值,权重值高的,如果找到多个时,优先进去

    4、进行快捷跳转

    在这里插入图片描述

    通过 j s 简写就可以快速进入某个常用目录

    操作起来,比 UI 页面的文件管理器还要快的多

    5、其它

    1、支持模糊匹配

    2、j --purge 清空所有的权重

    3、查看数据文件的内容

    cat /root/.local/share/autojump/autojump.txt
    js
    下一篇:没有了