Suppose 1000 processes are running on the system out of those
if you have to show only certain process ids which command
will you use?

Answers were Sorted based on User's Feedback



Suppose 1000 processes are running on the system out of those if you have to show only certain pr..

Answer / linuxdemon

ps -ef | grep pid

Is This Answer Correct ?    13 Yes 2 No

Suppose 1000 processes are running on the system out of those if you have to show only certain pr..

Answer / c sivakumar. kumarsiva46@yaho

pgrep -fl <scriptname> This command will show respective
process alone.

Example:-
ready> pgrep -fl genericShip.pl
(output following below)
11607 /usr/local/bin/perl /forms1/prodenv/genericShip.pl

Is This Answer Correct ?    0 Yes 1 No

Suppose 1000 processes are running on the system out of those if you have to show only certain pr..

Answer / suvarna

top command can also be used

Is This Answer Correct ?    0 Yes 2 No

Suppose 1000 processes are running on the system out of those if you have to show only certain pr..

Answer / bhaskar

ps -aef grep pid

Is This Answer Correct ?    1 Yes 4 No

Suppose 1000 processes are running on the system out of those if you have to show only certain pr..

Answer / aseem

It is up to you, how you want. For example suppose you want
to display a range like PID from 1500 to 2000 then

ps -ef | grep '[1500 - 2000]'

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More Unix Commands Interview Questions

How to replace the exact word in vi editor?? suppose a file contains words like amaze,amazed,amazement in some of the line.But i want to replace only 'amaze' with delight but don't wanna replace amazed or amazement. thanks

6 Answers   Polaris, Tech Mahindra,


What is the use of tee command?

0 Answers  


What is the use of cut command in unix?

0 Answers  


what is ls -ltd?

5 Answers   HCL,


How to open a Database using Unix Command Please Do Reply

9 Answers   Cognizant, CTS,






How does one process we can start an executable file? How to get the PID process, which we started?

6 Answers  


What command is used to check the current users?

0 Answers  


Explain command to show the space allocation of files?

0 Answers  


who to change the duplex setting of network interface in command line

1 Answers  


What does 'mkdir' command do in UNIX?

0 Answers   Syntel, Visa,


If JFS file system is 100% full how we can increase the file system ?

3 Answers  


What command would users use to see what file one page at a time in UNIX?

7 Answers   IBM,


Categories