Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-28-2005, 10:35 PM   #1
LQ Newbie
Registered: Jul 2005
Location: Indonesia
Posts: 23

Rep: Reputation: 15
using ps command without listing ps itself

Hi All,

I would like to know, how can we use ps command without listing the process of ps itself. Cause i would like to write shell script using ps, but it is also listing the ps process itself.

Thank you for your time.

With kind regards,
Old 08-28-2005, 10:42 PM   #2
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
i wouldnt think there would be a way to do this.. of course i can definetly be wrong though.

the purpose of linux is to have the kernel to control the hardware.. and have TONS of tiny programs to do 'one task, and do it well'. the purpose of ps is to list all running processes. it wouldnt be doing its job if it didnt list the ps process which you run.

edit: :O after briefly browsing the man page (the above was a guess, and i guess this is too as im not in linux to test) look at all the options.. you might be able to use a combination of the '--deselect' option along with the -C option to list only a certain command name.. i dunno, test it out, or fool around with it. good luck.

Last edited by nadroj; 08-28-2005 at 10:47 PM.
Old 08-28-2005, 11:44 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
ps -A| egrep -ve "(ps|egrep)"

Old 08-29-2005, 12:57 AM   #4
LQ Newbie
Registered: Jul 2005
Location: Indonesia
Posts: 23

Original Poster
Rep: Reputation: 15
Hi tinkster and nadroj,

Thank you for your input and it worked just as I wanted.

With kind regards,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 listing colabus Linux - Software 1 11-09-2005 06:51 PM
listing users... spotass Linux - Newbie 1 06-12-2004 02:18 AM
long listing using ls -l command display year or time of the file mnd_world Linux - Newbie 1 05-20-2004 11:39 AM
listing of package x2000koh Debian 3 07-29-2003 06:52 AM
Listing user IP Silversun Linux - Newbie 4 08-20-2002 11:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration