When ever I log into Linux I usually go straight to the same folder i was wondering if in stead of typing in:
$cd Document/..../..../..../..../....
I could create an executable so I could just type ./csFolder
and it would go straight there.
When ever I log into Linux I usually go straight to the same folder i was wondering if in stead of typing in:
$cd Document/..../..../..../..../....
I could create an executable so I could just type ./csFolder
and it would go straight there.
In addition to the other options (though if you use the function/alias option you want to use an absolute path to the target directory so it works from wherever you happen to be) you can use the environment variable
CDPATH
to help with this if you have a location you often go to from various other locations.From the POSIX specification:
Which means that if you set
CDPATH
to the parent of your target directory you can just usecd dirname
from anywhere and go directly to the directory you wanted to be in.Yo can do a symlink
ln -s /path/to/file /path/to/symlink
You can add a shell function in your
.bashrc
and restart your terminal:Whenever you want to go to that directory, you just run
csf
.