HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pbcopy — Copy data from `stdin` to the clipboard. Comparable to pressing `<Cmd c>` on the keyboard. More info

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandcopyfrompbcopyclistdindata
macos

Problem

How to use the pbcopy command: Copy data from stdin to the clipboard. Comparable to pressing <Cmd c> on the keyboard. More information: <https://keith.github.io/xcode-man-pages/pbcopy.1.html>.

Solution

pbcopy — Copy data from stdin to the clipboard. Comparable to pressing <Cmd c> on the keyboard. More information: <https://keith.github.io/xcode-man-pages/pbcopy.1.html>.

Place the contents of a specific file in the clipboard:
pbcopy < {{path/to/file}}


Place the results of a specific command in the clipboard:
find . -type t -name "*.png" | pbcopy

Code Snippets

Place the contents of a specific file in the clipboard

pbcopy < {{path/to/file}}

Place the results of a specific command in the clipboard

find . -type t -name "*.png" | pbcopy

Context

tldr-pages: osx/pbcopy

Revisions (0)

No revisions yet.