Monthly Archives: June 2019

Synchronize Directories in Bash Shell

The Problem

I often work in a Linux environment with multiple windows open in a tmux session. One of the pattern I see often is the need to navigate to the same directory for multiple windows. For example, in window 1, I navigated to a directory deep within my project:

$ cd ~/long/path/to/my/directory

Then, on window 2, I want to navigate to the same directory. This often involves either copy the command from window 1 and paste into window 2, or retype the same command again. There must be a better way.

Continue reading

Advertisements