CDIR – A Faster Way to Navigate Folders and Files on Linux

Are you tired of running multiple cd commands and ls commands while searching files and directories on your system? cdir is a cool and easy-to-use command-line utility that provides a pleasant way to navigate the bash shell and search for files. It is written in Python and uses the curses module.

Let’s briefly have an overview of some of the features it provides:

Functionalities of cdir Command

  • Supports the use of arrow keys when navigating between directories and searching for files.
  • Searches files by simply typing the name of the file within a directory.
  • Supports Bash Shell, Windows Powershell & Command Prompt.

Here is the live preview of cdir command in action.

CDIR - Navigate Folders and Browse Files Quickly
CDIR – Navigate Folders and Browse Files Quickly

Installation of CDIR on Linux

To install CDIR use pip, which is Python’s package manager as shown. For this case, I’m using pip3 since it’s installed by default alongside Python3.

$ pip3 install cdir --user
Install CDIR Tool in Linux
Install CDIR Tool in Linux

Once installed, append an alias to the .bashrc file as shown:

$ echo "alias cdir='source cdir.sh'" >> ~/.bashrc

And finally, reload the .bashrc file.

$ source ~/.bashrc
Create Alias in Linux
Create Alias in Linux

To start searching files, run the cdir command:

$ cdir

This will display a list of folders in your current working directory and hidden files.

List Files and Folders in Linux
List Files and Folders in Linux

To search files, use the arrow up and down keys to navigate between directories. In the example below, all files under the Downloads folder have been displayed.

Search Files in Linux
Search Files in Linux

To quit using cdir tool, simply press the F11 key on your keyboard. And that’s just about it. Give it a test run and let us know how it went.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

James Kiarie
This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.