Is there a way to copy text in htop?
--
Track title: CC H Dvoks String Quartet No 12 Ame
--
Chapters
00:00 Question
00:31 Accepted answer (Score 80)
00:48 Answer 2 (Score 5)
01:30 Answer 3 (Score 4)
02:26 Thank you
--
Full question
https://superuser.com/questions/809989/i...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ssh #putty #htop
#avk47
ACCEPTED ANSWER
Score 90
In my experience, holding Shift lets you select text in programs that have mouse support (of which htop
is one, I assume).
ANSWER 2
Score 7
If it's a linux server I'd just use the ps -ef command and pipe it to grep. For instance if you wanted to check on a rsync command you'd do this:
ps -ef | grep rsync
And that would spit out any process with the word rsync in it. Though it always will include the grep search as well. To exclude that just run:
ps -ef | grep rsync | grep -v grep
This will exclude grep itself from the search results.
Remember, htop is great software, but it's not the best for grabbing really long strings of text. In that case use ps -ef
ANSWER 3
Score 5
One approach to copy long lines from htop is the following:
step 1. Change the font size of your terminal to something very small (say 6pt).
step 2. Run htop and maximize window
step 3. Run your processes, switch to htop window and carefully do Ctrl + Shift + A to select everything, then release A and hit C (without releasing Ctrl + Shift). It might take some time to be able to do it (some of the times you might kill htop accidentally).
step 4. Open gedit or another text editor and Ctrl + V if the editor is a GUI or hit Ctrl + Shift + V if the editor opened on the terminal (for example nano).