Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to convert the VMS command show/system/process=processname into an equivalent Linux command.

I tried the following but it returned none of the processes:

ps -C /exeimages/processname.pl  
share|improve this question

2 Answers 2

ps -C looks for an exact match of the basename of the executable at the time if was executed. So, in this case, ps -C perl or ps -C processname.pl would more likely be what you want. What matters is what you find in /proc/<pid>/stat.

If you want to match on the command line (the concatenation of the arguments of the command including argv[0]), you can use pgrep -f as found on Solaris, recent Linux and most BSDs.

share|improve this answer

Probably you are looking for pgrep, or something cobbled together from that and ps

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.