How to navigate to Linux filesystem using Autojump
To navigate to Linux filesystem using Autojump
Autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories from the command line. It was written in Python, which is an advanced version of Linux ‘ cd‘ command. The jumpstat command shows you the current contents of the database. You need to work a little bit before the database becomes usable. Autojump will listen and rank your ‘ cd’ commands by frequency.
To install git package
Before installing autojump, install git package by using the following command.
[root@linuxhelp ~]# yum install git
Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh-packagekit, security, tmprepo, verify, : versionlock
Loading support for CentOS kernel ABI
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: epel.mirror.net.in
* extras: centos.excellmedia.net
* remi: mirror.innosol.asia
.
.
.
Installed:
git.x86_64 0:1.7.1-4.el6_7.1
Dependency Installed:
perl-Git.noarch 0:1.7.1-4.el6_7.1
Complete!
To Download the autojump
Download the autojump by using git command
[root@linuxhelp ~]# git clone git://github.com/joelthelion/autojump.git
Initialized empty Git repository in /root/autojump/.git/
remote: Counting objects: 3041, done.
remote: Total 3041 (delta 0), reused 0 (delta 0), pack-reused 3041
Receiving objects: 100% (3041/3041), 800.81 KiB | 28 KiB/s, done.
Resolving deltas: 100% (1795/1795), done
Go to the downloaded directory and Change the permission for the install.py script file as executable
[root@linuxhelp ]# cd autojump
[root@linuxhelp autojump]# chmod 755 install.py
Now run the script file
[root@linuxhelp autojump]# ./install.py
Installing autojump to /root/.autojump ...
creating directory: /root/.autojump/bin
.
.
.
copying file: ./bin/autojump.fish -> /root/.autojump/share/autojump
copying file: ./bin/autojump.zsh -> /root/.autojump/share/autojump
copying file: ./bin/_j -> /root/.autojump/functions
Install the autojump package
Now install the autojump package by using the following command.
[root@linuxhelp Desktop]# yum install autojump
Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh- : packagekit, security, tmprepo, verify, versionlock
Loading support for CentOS kernel ABI
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: epel.mirror.net.in
* extras: centos.excellmedia.net
.
.
.
Installed:
autojump.noarch 0:19-2.el6
Complete!
Before install this package you should install the epel repository.
To Make configuration for autojump package.
[root@linuxhelp autojump]# source /root/.autojump/etc/profile.d/autojump.sh
If you want to configure autojump temporarily, use the above method. To configure permanently then go to .bashrc and make the configuration into this file.
To Check the version of autojump
[root@linuxhelp autojump]# j -v
autojump v22.3.0
or
[root@linuxhelp autojump]# autojump -v
autojump v22.3.0
Auto jump will jump only to those directories, which has been called by ‘ cd’ earlier. Now open the some directories by using cd .
[root@linuxhelp]# cd Desktop
[root@linuxhelp Desktop]# cd
[root@linuxhelp ~]# cd Download
[root@linuxhelp Download]# cd
[root@linuxhelp ~]# cd Music
[root@linuxhelp Music]#
.
.
.
Done!
Open the directory which you want to perform with autojump. Even you can also open the child directory
To Open the directories with autojump
Open the Desktop directory by using autojump
[root@linuxhelp ~]# j De__
/root/Desktop
Same to open the music directory.
[root@linuxhelp ~]# j M__ /root/Music [root@linuxhelp Music]#
Now open the child directory by using autojump.
[root@linuxhelp ~]# j folder
/root/Desktop/my/test/folder
Open the child directory folder which was in /root/Desktop/my/test/folder you can simply open the child directory by using the autojump command.
Open the directory graphically in gnome terminal.
[root@linuxhelp ~]# jo etc
Now the /etc directory will be opened graphically.
To view the statistic of autojump
[root@linuxhelp ~]# j --stat
10.0: /var/www/html
10.0: /root/Desktop/my
11.0: /root/Downloads
14.9: /etc
17.1: /root/Music
17.9: /var/www
20.0: /root/Desktop/my/test
20.0: /root/autojump
20.1: /root/Desktop/my/test/folder
20.1: /root/Desktop
________________________________________
161: total weight
10: number of entries
0.00: current directory weight
data: /root/.local/share/autojump/autojump.txt
To view the more information about autojump
Go to the help page of auto jump in gnome terminal.
[root@linuxhelp ~]# j &ndash help
Comments ( 0 )
No comments available