ptree equivalent in HP-UX

UNIX95=1 ps -eHf
By setting the UNIX95 variable in HP-UX the XPG4 mode is activated, you get new options for ps and other commands, for me the best way to use this is to create an alias named ptree in root profile: alias ptree='UNIX95=1 ps -eH'

1
By: jreypo
2010-01-31 20:44:46

These Might Interest You

  • the -a flag causes tar to automatically pick the right compressor to filter the archive through, based on the file extension. e.g. "tar -xaf archive.tar.xz" is equivalent to "tar -xJf archive.tar.xz" "tar -xaf archive.tar.gz" is equivalent to "tar -xzf archive.tar.gz" No need to remember -z is gzip, -j is bzip2, -Z is .Z, -J is xz, and so on :)


    0
    tar -caf some_dir.tar.xz some_dir
    thetrivialstuff · 2011-06-09 19:00:06 0
  • Shows a tree view of parent to child processes in the output of ps (linux). Similar output can be achieved with pstree (also linux) or ptree (Solaris). Show Sample Output


    4
    ps auxf
    systemj · 2009-02-05 18:07:16 0
  • Can use lsof, but since it's not part of the base OS, it's not always available. Show Sample Output


    0
    for x in `ptree | awk '{print $1}'`; do pfiles $x | grep ${PORT} > /dev/null 2>&1; if [ x"$?" == "x0" ]; then ps -ef | grep $x | grep -v grep; fi; done 2> /dev/null
    bpfx · 2010-01-05 17:02:23 1
  • doskey is the Windows cmd.exe equivalent of the Unix alias. '$*' means 'all parameters' This example is like alias l='ls -alrt': it will display files from oldest to newest, for one or more directories. doskey /MACROS list macros defined for cmd.exe, like 'alias' list aliases defined for the current Unix shell.


    -7
    doskey l=dir /OD $*
    VonC · 2009-02-15 00:29:23 0

What Others Think

Very useful thanks
zlemini · 360 weeks and 2 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: