Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 11084  / 3 Years ago, tue, july 13, 2021, 5:11:58

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?


More From » 12.04

 Answers
4

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

[#25069] Wednesday, July 14, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pantkie

Total Points: 209
Total Questions: 112
Total Answers: 138

Location: Venezuela
Member since Sat, Apr 24, 2021
3 Years ago
pantkie questions
Tue, Feb 14, 23, 07:17, 1 Year ago
Sat, May 8, 21, 05:13, 3 Years ago
Sat, Jun 11, 22, 17:14, 2 Years ago
Thu, Mar 10, 22, 12:32, 2 Years ago
;