Z, a must use command line tool

Recently, I was updating my bash prompt and setting up some Zsh profiles when I found a great script called Z (https://github.com/rupa/z). Z keeps a history of your most used directories and allows you to quickly jump to them based on the most popular/frequently used directory that matches a partial string. I manage a lot of servers with a lot of website directories, and I have a lot of git repos locally, so this tool has saved me a ton of typing already. Here are some examples:

z proj -> Takes me to ~/projects
z blog -> Takes me to ~/projects/personal/blog
z Doc -> Takes me to ~/Documents
z www -> Takes me to /var/www

As you can see, for a super simple and easy to use script, it can save you a lot of time. Just download it, and source it via your .bashrc/.zshrc file.

Leave a Reply