Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown


Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
how to i list all the process id, but without own process it using 'grep'
[something$]ps -ef |grep cvs
kh 18426 18420 91 19:02 pts/0 00:00:05 /usr/java/cvs
kh 18442 18263 0 19:02 pts/0 00:00:00 grep cvs

i want only the result return only the first line without my own 'grep' proces id. thanks in advance
author and iconoclast
Posts: 24203
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you could say
ps -ef | grep cvs | grep -v grep
Or you could use the "pgrep" utility (part of the procps package, found on most Linux systems) and say
pgrep -lf cvs
which would just print
18426 /usr/java/cvs
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic