Linux "top -c" to show full command
26,047
Solution 1
htop
shows the full command. You can scroll to the right to see it all.
You can also rearrange, add and remove the columns to just show the information you are interested in. Press h
inside top for details (or man htop
in the terminal).
Solution 2
What helped was using the -O
option to move the command to the leftmost column and then -f
to remove most of the other items. I was interested to see only the full command which was being run.
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
What parameter can help me to display the full command using
top -c
?For example, I have one of the oupput from
top -c
5073 mysql 20 0 298m 12m 4668 S 0 0.0 29:27.46 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysql/mysqld.log --pid-file=/var/run/mysql/mysqld.pid -
There are more parameters after
--pid-file==/var/run/mysql/mysqld.pid
, but they are chopped off as the screen size. How can I make them visible? -
HikeMike almost 11 yearsThere doesn't seem to be an
-O
or-f
argument totop
. -
Evgeni Sergeev over 10 yearsPress
o
insidetop
to move columns left and right. Pressf
insidetop
to toggle columns. -
Evgeni Sergeev over 10 yearsAfter all the customisation, you may wish to press
W
fortop
to remember those settings for next time it starts.