Thursday, March 5, 2009

j.sh easy directory navigation

A former colleague told me about j.sh which is a great little bash script that follows you around the directories you cd into and tracks how many commands were run in each directory. Then when you want to pull up the most used directory matching a certain pattern you just

j somedir

and then you end up in

/home/jon/deep/nested/somedir

and it will put you into that directory.

Much better than push, dirs combo.

Even better, you can add an additional param to qualify the first

j somedir qualifier

and then instead of

/home/jon/deep/nested/somedir

you end up in

/home/jon/deep/nested/qualifier/somedir


No comments: