• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

bashmarks: Save and jump to commonly used directories using 1 character commands

by admin

“bashmarks” is a utility that allows users to conveniently save and quickly navigate to frequently used directories using short, single-character commands in the Bash shell. It enhances the efficiency and convenience of directory navigation by providing an easy way to bookmark and access specific locations within the file system.

With “bashmarks,” users can assign a memorable name or alias to a directory path and then use that name as a command to navigate directly to that directory from anywhere in the file system. This eliminates the need to type or remember long directory paths and reduces the time and effort required to access frequently visited locations.

The process of using “bashmarks” typically involves the following steps:

Marking a directory: To mark a directory, users navigate to the desired location in the file system and use a command, often prefixed with a specific character (such as “s” for “save”), to save the current directory with a chosen name or alias.

Navigating to a marked directory: Once a directory is marked, users can quickly navigate to it from any location in the file system by typing the assigned name or alias as a command. This command is often a single character that is easy to remember and type.

Managing bookmarks: “bashmarks” provides additional commands to manage the saved bookmarks. Users can list all the saved bookmarks, remove specific bookmarks, or delete all bookmarks.

By using “bashmarks,” users can streamline their workflow and save significant time and effort in navigating through the file system. It is particularly useful when frequently accessing deeply nested directories or switching between multiple project directories.

The utility is typically installed by sourcing a script that defines the necessary functions and aliases for “bashmarks” in the Bash shell. Once installed, the bookmarks are stored in a file, usually in the user’s home directory, so they persist across sessions.

bashmarks Command Examples

1. List available bookmarks:

l

2. Save the current directory as “bookmark_name”:

s bookmark_name

3. Go to a bookmarked directory:

g bookmark_name

4. Print a bookmarked directory’s contents:

p bookmark_name

5. Delete a bookmark:

d bookmark_name

Summary

In summary, “bashmarks” is a utility that simplifies directory navigation in the Bash shell by allowing users to save frequently accessed directories and jump to them using short, single-character commands. It improves productivity by reducing the need to type long directory paths and provides a convenient way to bookmark and access specific locations within the file system.

Filed Under: Linux

Some more articles you might also be interested in …

  1. basename Command Examples (Remove leading directory portions from a path)
  2. getent: command not found
  3. apropos – Search the manual pages for names and descriptions (Command Examples)
  4. lvremove Command Fails With Error “LVM – Can’t remove open logical volume”
  5. How to Start, Stop and Restart Zimbra Service
  6. avahi-browse Command Examples in Linux
  7. exec Command Examples in Linux
  8. drupal-check: Check Drupal PHP code for deprecations
  9. htop Command Examples
  10. ibmcloud Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright