Navigation

Main image
z vs cd tusqasi

cd Available everywhere

This command is available virtually where. It will take you to the path you give it.

cd path
This is change your CWD(Current Working Directory). You might already know about this command. But it has some things up it sleeves.

cd -
Will take you to the last directory you were in.

cd or cd ~
Will take you to your home folder. i.e ~ or /home/user_name/

Using cd to change directories

When you do ls -a, you always see these things.

Using ls -l on an empty folder
. and ..

These are special directories which mean, . is the shortcut to current folder and .. is shorcut to parent folder.

So to navigate to the parent directory we can use
cd ..

zoxide or z comes in many different flavours.

It will take a part of a path, and search through your path history. And then drop you into that folder immediately.

Lets say you have navigated to these paths sometime back

~/.config/nvim/
~/dev/project1/
~/sandbox/project_4

Now if you will do a
z task1a

zoxide will put you into right into ~/sandbox/project_4 directory.

Image description

How about, a preview, sorter, searcher? fzf is here.

Just try it out once. You will understand. Go through fzf github for install steps and more

Install through git

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

And say yes to adding keybindings in the setup.

You will need to reload the config file for your shell, as it is changed. Do this by closing the current terminal and open a new one. You will see something like this.

Image description

Some tips

Try using the linux manual with these commands, most commands and programs have a man entry.
Example.

man ls
man cd

You will find many new things in there. So enjoy!!

This article was updated on Thursday, 29 September 2022

tusqasi

I like making sand do stuff.