How do I pipe terminal standard output (stdout) to the clipboard?
Posted
by
Insperatus
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Insperatus
Published on 2012-09-05T15:28:49Z
Indexed on
2012/09/05
15:50 UTC
Read the original article
Hit count: 633
For example,
Say I want to list the contents of a folder and directly paste them into a chat window for a friend to see.
I realize I could do ls > filename.txt
to create a file (filename.txt) with those contents; I'd then have to open or print the file and manually select and copy the text block (which can be annoying/tedious.) I clearly could also select and copy the output of ls
directly from within the terminal window.
It would be much faster/easier to simply pipe standard output to the clipboard.
What terminal command allows me to do this?
© Ask Ubuntu or respective owner