Solved

ps -ef

Posted on 1997-11-16
6
796 Views
Last Modified: 2013-12-06
Whenever one wants to look at what process the system is
running, we usually use the command "ps -ef | grep $LOGNAME"
One of the problems I have is that the output does not show
the entire command that was executed.  The command line
gets truncated after (around) 80 characters or so.  What
options should I set (or what other command can I run) in
UNIX to enable me to look at the process command string in
it's entirety?
0
Comment
Question by:wee_liang
6 Comments
 

Expert Comment

by:sergik
ID: 2007818
Hi!

Try to add to your command line "www" (ps -efwww).
It works good for SunOS 4.1.4 and 5.5.1
0
 

Author Comment

by:wee_liang
ID: 2007819
Sorry that I didn't decribe the Unix OS clearly.  I've tried
this command you suggested ps -efwww on HP OS 9.X and it doesn't
know what that means.

Thanks for your suggestion anyway.

Any others could provide me a solution?
0
 
LVL 4

Accepted Solution

by:
jlms earned 10 total points
ID: 2007820
Check your man page, it should provide a switch to format the output, it is usually -o args, so your command should look similar to:

ps -ef -o args

this works in Solaris and Linux, HP should have something similar.

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007821
how about  -l  option? or just use
  man ps
0
 
LVL 3

Expert Comment

by:braveheart
ID: 2007822
It is unlikely that 'ps' is truncating your output at 80 chars.
What is more likely is that your terminal definition needs
altering so that long lines wrap around your screen and continue
on the following line. 'ps -efl' definitely works on HP-UX 10.xxx
0
 

Expert Comment

by:grantk
ID: 2007823
depends on the OS and the version of ps. If you're using
"-ef", you're running on a SysV system, and SysV ps is pretty basic compared to BSD ps. Get a copy of BSD ps and compile it.
For example, I run "lps -auxw" and get everything. The "w" means "wider", so you should use it.


0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now