2

I wanted to copy all of the process information related to a specific program/software (Adobe in this case, other ones in the future) and so I tried holding Shift as mentioned here:

Is there a way to copy text in htop?

but this does not seem to work in Mac OSX terminal.

Does anyone know if this is possible and, if so, how to do this?

Montag
  • 125

3 Answers3

3

Try holding Alt/Option or fn+option while selecting.

Vasfed
  • 1,342
1

Instructions:

  1. Try using top instead of htop. The -l1 flag will provide a static output.
  2. Pipe to grep; or use the mouse; to isolate / extract a particular process. (Optional).
  3. Pipe the output directly into pbcopy; or use the mouse; or ⌘C; to copy.
  4. Use pbpaste; or the mouse; or ⌘V; to paste the captured output.

Code:

tjt263@osx:~$ top -l1 |grep -i adobe
86284- Adobe Flash Play 0.0  00:01.36 3     0   142+   24K+   0B   19M+   86284 1     sleeping *0[78+]       0.00000 0.00000    501 11281+     531+     2380+       867+        5758+       3320+       4770+       1993+    1        0.0   tjt263          N/A    N/A   N/A   N/A   N/A   N/A  
tjt263@osx:~$ top -l1 |grep -i adobe |pbcopy
tjt263@osx:~$ pbpaste 86284- Adobe Flash Play 0.0 00:01.36 3 0 142+ 24K+ 0B 19M+ 86284 1 sleeping *0[78+] 0.00000 0.00000 501 11281+ 531+ 2380+ 867+ 5758+ 3320+ 4770+ 1993+ 1 0.0 tjt263 N/A N/A N/A N/A N/A N/A

Screenshots:

In case this is confusing for you;
I have provided some cropped screenshots:

head tail

voices
  • 2,881
0

Click with a mouse anywhere in the Terminal window.

Press Ctrl+a to select all text in the window.

Before the next refresh press Ctrl+c to copy all text.

Paste to a text editor with Ctrl+v and edit out unnecessary information.

techraf
  • 4,952