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?