Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have copied something from Internet and I want that copied text to get copied to a file. But how can I copy that text without using mouse or any command like Ctrl+V. I want to do this from terminal. How can I do that in Ubuntu 12.04?

share|improve this question
    

1 Answer 1

Using xclip.
For writing clipboard to file, overriding existing content:

xclip -o > /path/to/file.txt

or for appending clipboard to file:

xclip -o >> /path/to/file.txt
share|improve this answer
    
Good one. +1 from me. –  Avinash Raj May 22 at 15:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.