4 examples for xclip
# Copy the text "foo" to primary selection. echo "foo" | xclip # Copy the text "bar" to clipboard selection. echo "bar" | xclip -selection clipboard # Copy the text "yo" to primary AND clipboard selection for pasting EVERYWHERE! # (Psst, "alias xclip='xclip -i -sel c -f | xclip -i -sel p'") echo "yo" | xclip -i -sel c -f | xclip -i -sel p
# Copia en el portapapeles el contenid de un archivo indicado xclip -sel clip < ~/.ssh/id_rsa.pub