Quick way to switch between folders in the terminal

How to move and forward between your present and previous directories

A couple of days ago a found a really neat trick you can use when you are in the terminal window.

cd -

It will move you from the directory you were in to the directory you were in last, typing it again will bring you back to that first directory.

For example

cd /directory_one
cd /directory_two
cd -  (you are now in directory_one)
cd - (you are now in directory_two)

I’ve recorded a short video to show you.

Recent posts View all

JavaScript

Setting a more specific database type in Prisma

Prisma sets a default of TEXT for all String fields, here is how you can override that.

Ruby

Override database attribute types

Sometimes you don't have control over how your database handles information, so you need Rails to set it