Pages

Friday, June 2, 2017

bd – Quickly Go Back to a Parent Directory Instead of Typing “cd ../../..” Redundantly

While navigating the file system via the command line on Linux systems, in order to move back into a parent directory (in a long path), we would normally issue the cd command repeatedly (cd ../../..) until we land into the directory of interest.
This can be so tedious and boring much of the time, especially for experienced Linux users or system administrators who carry out so many various tasks, therefore hope to discover shortcuts to ease their jobs while operating a system.

In this article, we will review a simple but helpful utility for quickly moving back into a parent directory in Linux with the help of bd tool.
bd is a handy utility for navigating the filesystem, it enables you to quickly go back to a parent directory without typing cd ../../.. repeatedly. You can reliably combine it with other Linux commands to perform a few daily operations.

How to Install bd in Linux Systems

Run the following commands to download and install bd under /usr/bin/ using the wget command, make it executable and create the required alias in your ~/.bashrc file:
$ wget --no-check-certificate -O /usr/bin/bd https://raw.github.com/vigneshwaranr/bd/master/bd
$ chmod +rx /usr/bin/bd
$ echo 'alias bd=". bd -si" >> ~/.bashrc
$ source ~/.bashrc
Note: To enable case-sensitive directory name matching, set the -s flag instead of -si in the alias created above.

      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1n5ZKV
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment