I add this to my
.bashrc, etc… files to quickly copy directory paths from the command line:
pwd, clips the newline off then sends it to the pasteboard (aka clipboard).
Side note: "pwd" stands for "print working directory". Using "cwd" would make more sense grammatically (i.e. "copy working directory") but the keystrokes are cumbersome. Hence, I use "pwc". Your mileage may vary. Season to taste.