Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ -

There are more parameters after --pid-file==/var/run/mysql/, but they are chopped off as the screen size. How can I make them visible?

share|improve this question

migrated from May 8 '12 at 8:46

This question came from our site for professional and enthusiast programmers.

Why do you ask? Why don't you use e.g. ps auxww, perhaps thru watch ? – Basile Starynkevitch May 8 '12 at 7:42
You could use htop which supports scrolling. – ortang May 8 '12 at 8:21
@BasileStarynkevitch, goog question, I am not used to using "ps", but it is nice to know, thanks. – user200340 May 8 '12 at 8:49
up vote 7 down vote accepted

top per se doesn't support wrapping, if i am correct. One way is you can increase your terminal width as follows.


** then set update interval with 's _REFRESH_INTERVAL_'
** turn on command line display with 'c'
share|improve this answer
With zsh at least, this has undesirable side effects like shifting the right hand side prompt, and the initial position of the cursor. – Sridhar-Sarnobat Jun 18 '14 at 18:12

htop shows the full command. You can scroll to the right to see it all.

htop screenshot

share|improve this answer

You could use something like ps -eF > ps_out to get a snapshot of your current processes, with all the command line arguments. Or use htop which supports scrolling.


share|improve this answer

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|improve this answer
There doesn't seem to be an -O or -f argument to top. – Daniel Beck Aug 21 '13 at 19:24
Press o inside top to move columns left and right. Press f inside top to toggle columns. – Evgeni Sergeev Dec 15 '13 at 23:28
After all the customisation, you may wish to press W for top to remember those settings for next time it starts. – Evgeni Sergeev Dec 15 '13 at 23:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .