xsel

how to get file path without the filename itself

how to get file path without the filename itself im trying to find my .csv files then cd into their directory: find Documents/notes -type f -name "*.csv" | head -1 | xsel -b this copies the first file dir into my clipboard and i’d like to then run: cd $(xsel -b) but ofcourse I can’t …

Total answers: 2

xsel not working properly after upgrade to 22.04

xsel not working properly after upgrade to 22.04 I upgrade from Ubuntu 18.04 to 22.04 and having clipboard clearing issues using xsel If I ctrl+c in a text editor and run xsel -cb; xsel -cp; xsel -cs in terminal, the clipboard doesn’t clear (ctrl+v continues to paste content). Additionally, xsel -b does not return anything. …

Total answers: 1

How to run command when user push ctrl+c?

How to run command when user push ctrl+c? User selects any text and push ctrl+c. How to autorun command after this action? I need solutions for: How to get notification/check about the state of the clipboard After notification/check will autorun command I haven’t idea. Asked By: 69 420 1970 || Source X11 clipboards can be …

Total answers: 1

xsel: Can't open display: (null)

xsel: Can't open display: (null) I want to copy a long file into clipboard with xsel,in my local pc ,just input: cat /usr/bin/mysql_secure_installation|xsel -b The file mysql_secure_installation located in my local os was copied into clipboard. Now login to my vps with ssh command,then input DISPLAY=:0 cat /usr/bin/mysql_secure_installation|xsel -b I come across the error info: …

Total answers: 3

Alternative to xsel or xclip *without* X11 installed?

Alternative to xsel or xclip *without* X11 installed? xclip/xsel need X11. When I use putty from a Windows box to linux (without X11 installed), is there an alternative to xsel or xclip? I would like to pipe the complete shell command output to the clipboard which I then paste on the Windows box to an …

Total answers: 4

`tee` for commands

`tee` for commands tee can redirect the piped standard input into the standard output and file. echo Hello, World! | tee greeting.txt The command above would display the greeting on the terminal screen and save it in the contents of greeting.txt file, creating the file if there’s none by that name. There’s also -a switch …

Total answers: 2

'xclip' vs. 'xsel'

'xclip' vs. 'xsel' There are two command-line tools (in two different packages) to access the X clipboard: xclip xsel I would love to know the difference between those two and hear a recommendation which one to use in which cases. Asked By: Byte Commander || Source Both xclip and xsel can store text into 3 …

Total answers: 7