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

what are wild cards?

2 Answers  


In Unix file permissions what does the second field denotes?

3 Answers  


how to check a file system type

7 Answers   Wipro,


What is updatedb?

0 Answers  


What is grep in bash?

0 Answers  


How do you repeat a command in terminal?

0 Answers  


What is the use of the command 'ls -x chapter[1-5]' ?

0 Answers  


What is the command to find maximum memory taking process on the server?

0 Answers  


what is shell?

5 Answers  


what are the different commands used to view the contents of a file?

5 Answers  


what will this do $cat > file.c ?(file.c is a file in current directory)

20 Answers   IBM,


Write a command that will output the sorted contents of a file named in.txt and place the output in another file named out.txt, while at the same time excluding duplicate entries.

1 Answers  


Categories