I'm wondering if it possible to copy to clipboard output of pwd
command.
I often need to copy some path and I have to select it with mouse, do several clicks and that is annoying for me.
What I want is piping output of pwd
command to something that will copy it to clipboard so I do not have to touch my mouse
Edit: it will be great if it is possible with some built-in
cd
after that?xclip -o | cd
do not work – micgeronimo Mar 17 '15 at 10:28cd xclip-o
but use theto close the xclip -o..whatever code is inside
in the terminal will post the output of that code.it will get the output of xclip -o and then cd will change directory to it – bolzano Mar 17 '15 at 10:39xclip -o | xargs cd
orcd $(xclip -o)
– evilsoup Mar 17 '15 at 14:47cd "\
xclip -o`"` if there are spaces in cwd... – alessandro Apr 18 '17 at 08:30cat banana.txt | xclip
it copies fine.pwd | xclip
doesn't copy anything. – Phill Jun 12 '20 at 12:16