0

I go to my working directories by typing cd directory1/dir2/dir3/../ always. Is there any shortcut that I can make to go to my working directory instead of typing all these every time ?

3 Answers3

0

You can do symbolic link to the dir. I.e. in -s /path/to/dir/to/link link_name Then you can do cd link_name

Robert Navado
  • 1,319
  • 11
  • 14
0

You can try and search for "how to create symbolic/hard/soft links in linux". Below are some examples that may help you.

create symbolic link

Difference between hard and soft links

How to create hard links

Create soft link

Community
  • 1
  • 1
CuriousPenguin
  • 87
  • 1
  • 14
0

For windows you can create batch file with following code.

cd "c:\Documents and Settings\etc\etc"
start .

For Linux

You can use the environment variable CDPATH

Suppose you want to go to cd /usr/directory1/dir2/dir3/dir4/

export CDPATH=.:/usr/directory1/dir2/dir3

then typing cd dir4 would take you /usr/directory1/dir2/dir3/dir4/ assuming there's no directory named dir4 within the current directory

Antony
  • 512
  • 2
  • 18