How to find out the Process ID for particular one file

Hi,

How to find out the Process ID for particular one file.

Tell the all mostly used PS options in the real time

I could you appreciate if anyone answered

Thanks
Bhuvan

The fuser utility displays the processes that are using one or more files.

man fuser for more information

I am not able to issue this command. What permissions do I need to run this command? Linux version is RedHat AS 4

I don't have AS 4 handy, on ES 4 is present, so you might wanna try full path : /sbin/fuser or use "lsof | grep "pattern"

Hi Bhuvan,

While using the common 'ps' (process status) command

You need to use the 'a' option to see the processes by all users and the 'x' option to show all of the processes outside of the scope of the shell.
# ps -ax

If you just run that command as is, the results will just scroll by.

In order see and browse the results at you own pace you can pipe the list into 'less'.
# ps -ax | less

Or if you want to search for a particular application process, instead of piping in 'less' you can pipe the results into grep.
# ps -ax | grep search

For example I can find the process id of Firefox by doing something like this:
# ps -ax | grep firefox
3399 ?? S 3:30.90 /Ap ... OS/firefox-bin -ps ...
3456 p1 S+ 0:00.00 grep firefoxthis will solve your problem.

Regards
Dinesh