Sample Header Ad - 728x90

Copy to clipboard some previous lines of bash terminal with keyboard only

1 vote
2 answers
184 views
Let's say you do ls -al in a Bash shell in Debian or Ubuntu and get: ``` drwxrwxrwt 95 root root 12288 Sep 28 2024 tmp drwxr-xr-x 14 root root 4096 Sep 28 2024 usr CTRL+SHIFT+V? (without using the mouse, everything with keyboard only) Is it possible with arrow keys and a combination of keys? Note: * I don't want to use ls -al | any_tool_to_parse_output, but rather the ability to move in previous output lines and copy/paste. One of the reasons is that, often, you don't know in advance that you want to copy the (n-2)th line when running a command: it's only when seeing the output after the command has been run, that you want to copy/paste something. * Let's say we use "Xfce 4 terminal emulator" (/usr/bin/xfce4-terminal), or Gnome Terminal. A solution with one of them would be great.
Asked by Basj (2579 rep)
Oct 3, 2024, 06:05 PM
Last activity: Oct 7, 2024, 06:22 PM