I'm starting to use Oracle Solaris 11.2 SPARC.
In Linux, I can write
ps aux | grep *some_data*
... but that doesn't show any result on Solaris.
Instead I need to say
ps auxww | grep *some_data*
I had a look at man ps
to find more information about ww
If the option letter is repeated, that is, -ww, this option uses arbitrarily wide output
Why do I need to use ww
to get anything to grep
?
On Linux the ps
command detects whether the output is to a terminal or not. If it is to a terminal then it truncates the output to the terminal width. If it is not on a terminal then it doesn't truncate. Effectively it behaves as if it automatically adds the ww
flags.
You can see the difference by typing ps aux
and ps aux | cat
In your example you are piping the output to grep
and so it acts as if you typed ps auxww | grep
.
For portability you should always use the ww
flags if you want to see all the data beyond (say) 80 characters.
Note: you're using the BSD form of the ps
command, so on Solaris make sure you're calling the right one!
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments