cat file | xclip -selection clipboard
cat > /path/to/file.txt after this the terminal waits user input, so you can paste from your clipboard: Ctrl + Shift + v Then press Enter And exit cat with Ctrl + c