Find the answer to your Linux question:
Results 1 to 4 of 4
hi guys i m new to unix and its really awesome i need to obtain only the id of a process ps -C "name" gives me a long string and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    6

    process id


    hi guys

    i m new to unix and its really awesome

    i need to obtain only the id of a process

    ps -C "name"

    gives me a long string and i cann't store tht

    how can i obtain its id only

  2. #2
    Just Joined!
    Join Date
    Jun 2009
    Posts
    6
    pls help me out

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Try using:

    pgrep process_name
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. #4
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    how about using ps -el and then searching for the process id
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •