|March 8, 2017|
When you SSH to a remote box do you change to the same set of directories? Wouldn't it be great to bookmark the locations to make it easy to get to? You can with Bashmarks!
Bashmarks gives you the ability to create simple bookmarks to any location on your server. Now you can jump to whatever directory you want wherever you are on the box.
As my former boss would say, "Now your cooking with gas."
Setting up Bashmarks
Bashmarks is simply a shell script that performs actions.
Download bashmarks.sh from GitHub. Put the file someplace where you won't accidentally delete it. (~/bin is a safe place, Macintosh users may want to keep it in /usr/local/bin)
If it isn't easy to move the file, simply copy and paste the contents of the file into a new file on the server that you want to use. (The file size is small.)
Update the .bash_profile with the following line:
# Make sure the directory and filename is correct.
Exit out and log back in the server.
If it's installed correctly, you should get back an empty line.
It's super easy to use BashMarks. When your at a directory that you want to bookmark simply type in:
Where "staging" is the name of the bookmark - Tip: keep it simple and short.
When you want to go to that directory simply type in:
If you want to see all the Bashmarks that you have installed, type in:
Currently Bashmarks only works with directories and not applications. However, you have the bashmarks.sh source file and it should be easy to manipulate it to do what works best in your environment. For example, you could shorten the word 'bookmark' to simply 'book.'
Enjoy playing around with Bashmarks!
Add your Comments
Feel free to leave a comment about this post.