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 do you remove a crontab file?

6 Answers  


What does find command return in unix?

0 Answers  


what do you understand by 'unix is a portable os'?

3 Answers   Infosys,


What is the use of find command in unix?

0 Answers  


which script will invoke first ,when /etc/init.d starts

1 Answers  






How to copy multiple files and directories into some other directory?

4 Answers  


What is {} in find command?

0 Answers  


which command is used to stop a running process in unix?

8 Answers  


How do I use grep to find a file?

0 Answers  


their is a file1,file2 and i want to append file1 data to file2?

9 Answers   IBM,


What is grep r?

0 Answers  


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

0 Answers  


Categories