Forrest logo
tool overview
On this page you find all important commands for the CLI tool pbcopy. If the command you are looking for is missing please ask our AI.


pbcopy is a command line tool available on macOS that allows users to copy text to the clipboard directly from the command line. It is a handy utility that comes pre-installed with the operating system.

When the pbcopy command is used, the output is captured and saved to the clipboard. This means that any text or data outputted from a command can be copied and subsequently pasted into another document or application without having to manually select, copy, and paste.

pbcopy is particularly useful when working with scripting languages or when dealing with lengthy command outputs that need to be shared or manipulated elsewhere. Additionally, the tool plays a significant role in automating workflows and integrating command line operations into other applications or scripts.

The command syntax is straightforward: pbcopy < file copies the content of a file to the clipboard, while echo "text" | pbcopy copies the specified text string.

To verify that the text was copied successfully, the pbpaste command can be used to output the content of the clipboard in the terminal.

Overall, pbcopy simplifies the process of copying command line output and enhances efficiency by eliminating the need for manual copying and pasting.

List of commands for pbcopy:

  • pbcopy:tldr:574b2 pbcopy: Place the contents of a specific file in the clipboard.
    $ pbcopy < ${filename}
    try on your machine
    explain this command
tool overview