autojump是什么

autojump是一个Linux命令行工具,它允许你通过模糊匹配就可以一步跳转到想要的目录,不管你在哪里(目录)!是不是很神奇?是不是比cd``````tab这些命令好用百倍?OK,下面介绍一下autojump的安装、配置及使用

通过yum安装基本安装不上,应该是yum源里没有,去网上看了下也没有找到autojump的yum源,这里通过git安装

第一步:下载autojump

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

第二步:安装
2.1先跳转到autojump的根目录下 cd autojump/
2.2安装: ./install.py 或者 python install.py

还是把安装日志附上吧

[root@data3 autojump]# ./install.py
Installing autojump to /root/.autojump ...
creating directory: /root/.autojump/bin
creating directory: /root/.autojump/share/man/man1
creating directory: /root/.autojump/etc/profile.d
creating directory: /root/.autojump/share/autojump
copying file: ./bin/autojump -> /root/.autojump/bin
copying file: ./bin/autojump_argparse.py -> /root/.autojump/bin
copying file: ./bin/autojump_data.py -> /root/.autojump/bin
copying file: ./bin/autojump_match.py -> /root/.autojump/bin
copying file: ./bin/autojump_utils.py -> /root/.autojump/bin
copying file: ./bin/icon.png -> /root/.autojump/share/autojump
copying file: ./docs/autojump.1 -> /root/.autojump/share/man/man1
creating directory: /root/.autojump/etc/profile.d
creating directory: /root/.autojump/share/autojump
creating directory: /root/.autojump/functions
copying file: ./bin/autojump.sh -> /root/.autojump/etc/profile.d
copying file: ./bin/autojump.bash -> /root/.autojump/share/autojump
copying file: ./bin/autojump.fish -> /root/.autojump/share/autojump
copying file: ./bin/autojump.zsh -> /root/.autojump/share/autojump
copying file: ./bin/_j -> /root/.autojump/functionsPlease manually add the following line(s) to ~/.bashrc:[[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source  /root/.autojump/etc/profile.d/autojump.sh

第三步:配置
根据安装日志的提示,在.bashrc文件里添加下面的配置

[[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.sh

第四步:使配置生效
source 一下就行了

source .bashrc

工作原理:
autojump会在你每次启动命令时记录你当前的位置,并把它添加到自身的数据库。
这样哪个目录使用的次数越多,表示这个目录越重要,权重越大,进行模糊跳转的时候输入得越简单。
使用方式

基本使用

autojump pattern

**autojump 也可以缩写为j **
pattern就是要跳转的目录的模糊匹配

不太明白?好,来个Demo
比如说你经常使用的一个目录为:/home/java/apache-tomcat-8.5.16-case/webapps/case/WEB-INF/classes/config
使用命令

j co

就可以直接跳转到该目录下
j是autojump的简写
co是config目录的简写
当然如果这个目录你使用得特别特别多的话使用j c也是可以的
如果使用得没有那么多的话j co可能匹配到其他的目录上,这个时候你可能就需要输入j config了

另外你刚刚安装好的时候是不能直接使用的,autojump不知道你经常使用哪个目录,怎么给你跳转?用一会儿就行了

你还可以查看一下当前多个目录的权重

j --stat

autojump是什么相关推荐

  1. 终端文件夹跳转工具autojump

    在终端的文件夹跳转非常麻烦, 需要敲长长的路径. alias 别名也不是很方便. autojump 是通过记录进入过的目录到数据库来实现的, 所以必须是曾经进入过的目录才能跳转. 1. 安装 1.1. ...

  2. linux怎么连续退回上次目录?cd - 只能在两个目录间来回切换(autojump)(pushd popd dirs)

    方法1 GitHub 搜索 autojump ,可能会满足你的需求. 参考文章:linux怎么连续退回上次目录? - Nlage的回答 - 知乎 方法2 pushd popd dirs 当进到想保存的 ...

  3. AI 玩微信跳一跳的正确姿势:跳一跳 Auto-Jump 算法详解

    作者丨安捷 & 肖泰洪 学校丨北京大学硕士生 研究方向丨计算机视觉 本文经授权转载自知乎专栏「学术兴趣小组」. 最近,微信小游戏跳一跳可以说是火遍了全国,从小孩子到大孩子仿佛每一个人都在刷跳一 ...

  4. linux 安装centos7,linux CentOs7 安装 Autojump 方便高效省事-Go语言中文社区

    一.简介 autojump是一个命令行工具,它允许你可以直接跳转到你喜爱的目录,而不用管你现在身在何处. 有多种安装手法,但我只推荐我接下来介绍的一种: 首先确定你的系统开启EPEL保证有软件包源(在 ...

  5. MacOS使用brew无法安装Python_无法安装gdbm_无法安装autojump

    文章目录 出现的问题 解决无法安装gbdm的问题 解决无法安装Python的问题 GNU 程序国内下载源:https://mirrors.ustc.edu.cn/gnu/ brew 下载的软件安装包存 ...

  6. 快速切换目录软件推荐——autojump

    受到<autojump: 在命令行下快速更改目录>的鼓动,决定试用下这个软件. 但ubuntu下的源貌似有些问题, sudo apt get install autojump 后,死活提示 ...

  7. 一款好用的切换目录的工具autojump

    在命令行中切换目录是最常用的操作,不过很少有比一遍又一遍重复"cd ls cd ls cd ls --"更令人沮丧的事情了.如果你不是百分百确定你想要进入的下一个目录的名字,那么你 ...

  8. 使用zsh+oh-my-zsh+autojump

    <MacTalk·人生元编程>介绍说zsh是终极Shell.反正Mac自带,不妨chsh -s zsh切换来看看. alias -s c=vim,关联.c文件到vim,在terminal直 ...

  9. AI玩微信跳一跳的正确姿势:跳一跳Auto-Jump算法详解

    最近,微信小游戏跳一跳可以说是火遍了全国,从小孩子到大孩子仿佛每一个人都在刷跳一跳,作为无(zhi)所(hui)不(ban)能(zhuan)的 AI 程序员,我们在想,能不能用人工智能(AI)和计算机 ...

  10. mac安装autojump

    mac安装autojump 1. 命令行安装: brew install autojump 2. 配置 在用户目录下的.zshrc文件中找到plugins=""这一行,设置为 pl ...

最新文章

  1. ironpython 教程_「ironpython」VS2017 IronPython做界面
  2. 工厂模式、策略者模式、责任链模式综合应用
  3. http://blog.csdn.net/churximi/article/details/61210129
  4. c++计算机等级考试笔记(1)
  5. NSDate根据日期获得当前是周几,以及一年内的第几周,以及一个月内得第几周...
  6. xp系统没有服务器时间,WinXP系统时间无法同步网络时间连时区也不显示的解决方法...
  7. matlab里符号的写法,Matlab中特殊符号的写法
  8. 亚马逊 html格式转换,亚马逊七种产品描述常用HTML代码,文字颜色代码让Listing更出彩...
  9. zentaoPHP学习
  10. mysql搭建主从结点
  11. 【爬虫剑谱】二卷7章 实战篇-搭建IP代理池绕过反爬检测
  12. 在微博中应用PageRank算法
  13. Python在运维工作中的经典应用之ansible
  14. [UE4]关于分支Sequence和条件分支的组合用法
  15. 央视网与中国网络电视台5月底正式合并
  16. RTKLIB源码解析(三)、 Rinex文件读取(rinex.c)——2
  17. CF 285D 285E
  18. Xcelsius介绍
  19. UG NX二次开发(C#)-UI Styler-批量选择点
  20. 神书《纳瓦尔宝典:财富和幸福指南》说了些什么

热门文章

  1. ftp小程序_FTP程序安全吗?
  2. python中socket详解_python socket函数详解
  3. Python-Django毕业设计天津市杨柳青智慧景区信息系统(程序+LW)
  4. Makefile文件中的 .PHONY 的作用
  5. 依赖冲突了如何解决?
  6. Topk问题的三种求解方法
  7. aws sqs java_示例 Amazon SQS 函数代码 - AWS Lambda
  8. php删除数组中指定的元素,php如何删除数组中指定的元素?
  9. java删除数组中指定元素_java学习中如何删除数组中的指定元素
  10. 网易云音乐项目搭建实战来了!