Is there a way to copy text in htop?
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Unforgiving Himalayas Looping
--
Chapters
00:00 Is There A Way To Copy Text In Htop?
00:24 Accepted Answer Score 90
00:37 Answer 2 Score 5
01:19 Answer 3 Score 7
01:49 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).