Directory Shortcuts in Linux

The situation

Often I end up going to the same directories in the terminal over and over again. Some of those directories are like 10 folders deep. It gets old tabbing through all those directories.

Linux saves the day

Use the link command to create a nickname for a directory path. (example below)

ln -s /home/whoa/crazy/uhhh/wow/there/are/a/lot/of/directories banana

So next time instead of typing that crazy long directory, all you have to type is banana.

-s is for a ‘soft link’. This just means that when that directory is deleted, banana will no longer be a valid shortcut.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s