Extend your shell toolbox with pbcopy

I’m developing Rails applications on Mac and a command which isn’t used enough in my opinion is “pbcopy”. This command will allow you to grab the standard input from a terminal and put it on the clipboard.

I find myself using commands such as “pwd | pbcopy” a lot. This will grab my current working directory and make it available in my clipboard allowing me to easily paste it into another terminal or application. This avoids the need for you to grab your mouse to paste a simple line.

Just a quick tip for developers switching between terminal and desktop applications on a regular basis.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.