Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When we enter:

ps -f

... the CMD column text doesn't show the full command. Any way to prevent this truncating?

Seems like it's showing the first 80 characters. We are running a fairly log command that has lots of command line switches.


Thanks for the responses.. doesn't seem like any of these do the trick though..

share|improve this question

migrated from stackoverflow.com Oct 12 '12 at 1:17

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

2  
Here we go again... FWIW I don't think this necessarily belongs on serverfault. When I'm debugging my programs it is important to be able to see the full commandline with which a they were called. –  Nathan Fellman Jun 22 '09 at 8:15
    
May be unix.stackexchange.com is a better place for this question? –  Antonio Jan 23 at 18:33

6 Answers 6

Pipe the result into cat .. that'll ignore your terminal settings.

ps -f | cat
share|improve this answer

ps detects the size of your terminal window and clips to that.

Solution: don't output directly to the terminal!

ps -f | less
share|improve this answer

If /usr/ucb dir exists then you may try following command

/usr/ucb/ps -auxww | grep java
share|improve this answer

man ps:

-w Use 132 columns to display information, instead of the default which is your window size. If the -w option is specified more than once, ps will use as many columns as necessary without regard for your window size. When output is not to a terminal, an unlimited number of columns are always used.

Hence

ps -f | cat

works

share|improve this answer

I found this on my FreeBSD's 9 ps man page:

-w Use 132 columns to display information, instead of the default which is your window size. If the -w option is specified more than once, ps will use as many columns as necessary without regard for your window size. Note that this option has no effect if the “command” column is not the last column displayed.

So:

ps auxww

Did what I wanted.

HTH!

share|improve this answer
    
Confused why this isn't the most popular answer. –  Adam Mackler May 19 at 14:03

G'day,

Don't forget that -eaf works with normal ps only and not luddite ucb ps.

Ucb ps uses multiple -w options to give you the complete command line.

HTH

cheers,

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.