Getting entire command from ps -ef


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Getting entire command from ps -ef
# 1  
Old 08-13-2006
Getting entire command from ps -ef

now, when you run ps -ef, the very last field of the output contains the command. now, most of the time, these command are cut off and one can not see the complete name of the command that kicked off the process.

is there anyway to get this information? i mean, the complete command in its entirety. i hope i'm clear enough in my explanation. thanks
Terrible
# 2  
Old 08-13-2006
What OS are you using? On BSD, you can use the 'w' switch to get more of the command line, on Solaris, you can use /usr/ucb/ps with the 'w' switch as well. If you are on HP-UX, you might try using the 'l' (ell) switch, but that will also slice off part of the command line. In Linux, use the normal ps command without the '-' so that it will behave like the BSD ps (says so on the man page atleast).
# 3  
Old 08-13-2006
we are using solaris and linux systems here.

thanks
Terrible
# 4  
Old 08-14-2006
If you are only interested in the command names only then you can also try

ps -ef | awk '{ print $8}'

regards
Apoorva Kumar
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Backing up an entire HD

Are there any recommended methods for Backing up an entire HD? I want to backup my data. I do not care about the OS file. I just want my work, movies, and music. I have about 600 GB of work, movies, and music so a bit worried about fragmentation if I just copy and paste. (1 Reply)
Discussion started by: cokedude
1 Replies

2. Solaris

Entire server unresponsive

Hi guys, I have a SUN M5000 server running several Solaris zones (whole root). In all the zones, I have SAP systems running. Recently, one of the SAP systems got stuck (hanged), I suppose was a memory issue. I was not able to log into the zone at all. In fact, I observed that I was not able to... (6 Replies)
Discussion started by: frum
6 Replies

3. Shell Programming and Scripting

Specify an entire UNIX command as a command line argument

I'm trying to write a bash script called YN that looks like the following YN "Specify a question" "doThis" "doThat" where "doThis" will be executed if the answer is "y", otherwise "doThat". For example YN "Do you want to list the file dog?" "ls -al dog" "" Here's my attempt... (3 Replies)
Discussion started by: LeoKSimon
3 Replies

4. Shell Programming and Scripting

Conditional grep command to search entire file

Let me give you a complete example what I am trying to achieve. 1. Below is the log file structure where I need 2,5 and 14th column of the logs after grepping through the linkId=1ddoic. Log file structure:- abc.com 20120829001415 127.0.0.1 app none11111 sas 0 0 N clk Mozilla/5.0... (3 Replies)
Discussion started by: kmajumder
3 Replies

5. UNIX for Advanced & Expert Users

Entire Input command not visible in Unix prompt

Hi, While typing the Unix command, entire command is not visible.When the input command is long, it is not visible. I want the entire command to be displayed when i type it. Please help to resolve this issue. Thanks Sampath (7 Replies)
Discussion started by: sampath.giri
7 Replies

6. UNIX for Dummies Questions & Answers

Show the entire line using ps

Using the vanilla ps -ef I noticed that the CMD (or command) line gets cut off after 90 characters UID PID PPID C STIME TTY TIME CMD root 6020 3822 0 Jun 19 ? 0:01 ./webservd-wdog -r /export/opt/sows/61sp4 -d /export/opt/sows/61sp4/https-logse Googling... (4 Replies)
Discussion started by: SixSigma1978
4 Replies

7. Shell Programming and Scripting

Show entire lines with diff command

Hi, When I run the diff command using diff -yt file1 file2, I get the output in which original lines are truncated. I tried using -W switch with diff. However, that does not produce exact output as I want. Is it possible to show entire line of file1 and file2 in diff command's output? ... (8 Replies)
Discussion started by: jal_capri
8 Replies

8. UNIX for Advanced & Expert Users

command to replace the entire line from the key point

Hi everyone I am new to Unix. I got stuck up by small issue. I have text file something like this abc 'xyz' '5' lmn 'pqr' '7' i want to replace the abc 'xyz' '5' to abc 'xyz' '6' but i have a key as 'xyz' based on this key i want to do that. I am not aware of how to use sed... (7 Replies)
Discussion started by: Vijayaragavan
7 Replies

9. Shell Programming and Scripting

Capture entire line in ps command

I need to determine what processes are running at certain times of the day. I have a script that issues the /usr/ucb/ps aux command and captures it to a file. I want to see the cpu usage and memory usage. This command lops off the end of the of the display line so I can't see the entire... (2 Replies)
Discussion started by: MizzGail
2 Replies

10. UNIX for Advanced & Expert Users

Read the entire output fired by ps command

Actually I want to display the entire output fired by ps command. My output gets trucated after 80 chars. Thus, i am not able to see the entire command running when i give a ps -eaf .... Does anyone know how do i display the entire output fired by ps command .. (i.e the command along with... (5 Replies)
Discussion started by: vinithepoo
5 Replies
Login or Register to Ask a Question