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.

htop screenshot

http://hisham.hm/htop/

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.

Share:
26,047

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    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
    HikeMike almost 11 years
    There doesn't seem to be an -O or -f argument to top.
  • Evgeni Sergeev
    Evgeni Sergeev over 10 years
    Press o inside top to move columns left and right. Press f inside top to toggle columns.
  • Evgeni Sergeev
    Evgeni Sergeev over 10 years
    After all the customisation, you may wish to press W for top to remember those settings for next time it starts.