Solaris ps aux command specific output. Why do need the `ww` flags to find matches with grep?

P.Grjozs

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?

Stephen Harris

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why is this command not working: "ps aux | grep xscreensaver"

From Dev

Output of the ps command and understanding the flags

From Dev

grep for specific process in ps but not the grep command itself

From Dev

watching output of "ps aux | grep blah" in tmux will not work?

From Dev

ps aux | grep with a dot

From Dev

ps aux | grep with a dot

From Dev

Executing command ps with a specific output via execlp

From Dev

Filter output of 'ps aux'

From Dev

Filter output of 'ps aux'

From Dev

ps aux output meaning

From Dev

shortening the output from the command ps efo cmd | grep

From Dev

grep randomly appearing and disappearing in ps aux (ps aux | grep python)

From Dev

Grep specific paragraph of command output in Linux

From Dev

Shell script to find the process state while excluding 'ps grep command'

From Dev

grep OR command not working unix solaris

From Dev

What is the alternate command of grep -A for Solaris?

From Dev

What is the alternate command of grep -A for Solaris?

From Dev

grep loop: I'm using each line of one file as query to find matches another file. Why is my output inconsistent?

From Dev

Why doesn't grep remove lines of terminal output from find command by default?

From Dev

Why the output of grep command with following patterns is like that?

From Dev

why does this grep command have no output?

From Dev

How do I redirect output from the find command (that uses grep) to a log file?

From Dev

Ruby - System Command - ps aux

From Dev

For the results of either ps aux or ps -ef, how do I just find the commands with brackets?

From Dev

Why do I get different exit status for ps | grep in a script?

From Dev

Why does "ps aux | grep x" give better results than "pgrep x"?

From Dev

Why do I need list context when writing unix command output to a file in Perl?

From Dev

Why do I need list context when writing unix command output to a file in Perl?

From Dev

ps aux | grep returns pid for itself too

Related Related

  1. 1

    Why is this command not working: "ps aux | grep xscreensaver"

  2. 2

    Output of the ps command and understanding the flags

  3. 3

    grep for specific process in ps but not the grep command itself

  4. 4

    watching output of "ps aux | grep blah" in tmux will not work?

  5. 5

    ps aux | grep with a dot

  6. 6

    ps aux | grep with a dot

  7. 7

    Executing command ps with a specific output via execlp

  8. 8

    Filter output of 'ps aux'

  9. 9

    Filter output of 'ps aux'

  10. 10

    ps aux output meaning

  11. 11

    shortening the output from the command ps efo cmd | grep

  12. 12

    grep randomly appearing and disappearing in ps aux (ps aux | grep python)

  13. 13

    Grep specific paragraph of command output in Linux

  14. 14

    Shell script to find the process state while excluding 'ps grep command'

  15. 15

    grep OR command not working unix solaris

  16. 16

    What is the alternate command of grep -A for Solaris?

  17. 17

    What is the alternate command of grep -A for Solaris?

  18. 18

    grep loop: I'm using each line of one file as query to find matches another file. Why is my output inconsistent?

  19. 19

    Why doesn't grep remove lines of terminal output from find command by default?

  20. 20

    Why the output of grep command with following patterns is like that?

  21. 21

    why does this grep command have no output?

  22. 22

    How do I redirect output from the find command (that uses grep) to a log file?

  23. 23

    Ruby - System Command - ps aux

  24. 24

    For the results of either ps aux or ps -ef, how do I just find the commands with brackets?

  25. 25

    Why do I get different exit status for ps | grep in a script?

  26. 26

    Why does "ps aux | grep x" give better results than "pgrep x"?

  27. 27

    Why do I need list context when writing unix command output to a file in Perl?

  28. 28

    Why do I need list context when writing unix command output to a file in Perl?

  29. 29

    ps aux | grep returns pid for itself too

HotTag

Archive