🖥️xsel
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the xsel command with important options and switches using examples.
2 minute read
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██╗ ██╗███████╗███████╗██╗
# ╚██╗██╔╝██╔════╝██╔════╝██║
# ╚███╔╝ ███████╗█████╗ ██║
# ██╔██╗ ╚════██║██╔══╝ ██║
# ██╔╝ ██╗███████║███████╗███████╗
# ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
# X11 selection and clipboard manipulation tool.
# Use a command's output as input of the clip[b]oard (equivalent to Ctrl + C):
echo 123 | xsel -ib
# Use the contents of a file as input of the clipboard:
cat file | xsel -ib
# Output the clipboard's contents into the terminal (equivalent to Ctrl + V):
xsel -ob
# Output the clipboard's contents into a file:
xsel -ob > file
# Clear the clipboard:
xsel -cb
# Output the X11 primary selection's contents into the terminal (equivalent to a mouse middle-click):
xsel -op
xsel | nl | grep [email protected]
# Paste a list of email addresses and number them and show the entry for a specific address.
xsel -b | sed 's/2018/2019/g' | xsel -b
# Replace all instances of 2013 with 2014 in your X windows copy buffer.
# Take the text in your select/copy buffer (Xwin or Mac) and sort it then print unique lines with a "count of duplicates" prior to the line.
{ xsel || pbpaste; } | sort | uniq -c
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command xsel in a clear format. This allows users to quickly access the needed information for xsel without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for xsel are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.