Close

Results 1 to 9 of 9
  1. #1
    DF VIP Member Roo's Avatar
    Join Date
    Aug 2002
    Location
    UK - Coventry
    Posts
    529
    Thanks
    0
    Thanked:        0
    Karma Level
    290

    Default Linux shell script help?

    Dunno if anyone can help me but its worth a go lol.

    Basically I need to find a command to show just the PID's and their status' (JUST these two things, I know you can put 'ls -a' and that will show everything).

    I know its a long shot, but dunno if anyone here is a whizz with Linux or somet.

    Plus does anybody know of any decent sites where I can find shell commands etc.

    Thanks in advance.
    CONTACT

    My liver is evil and must be punished!



  2. #2
    DF VIP Member OrangeJuicey's Avatar
    Join Date
    Aug 2006
    Location
    London
    Posts
    1,283
    Thanks
    1
    Thanked:        4
    Karma Level
    289

    Default Re: Linux shell script help?

    Yeah try using the help pages. Its man man in the console for the help page. Ok my thought is you might be able to use grep or fgrep with the right paramerters to go through your ls -a and just give u PID's. I'm a noob on linux so i'm not sure. Good luck lol

  3. #3
    DF VIP Member SpArKy's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    222
    Thanks
    0
    Thanked:        0
    Karma Level
    284

    Default Re: Linux shell script help?

    % ps -o pid -o stat
    PID STAT
    4351 S
    7593 R

    Hope thats what u meant?
    It's better to reign in hell, than serve in heaven!

  4. #4
    DF VIP Member Roo's Avatar
    Join Date
    Aug 2002
    Location
    UK - Coventry
    Posts
    529
    Thanks
    0
    Thanked:        0
    Karma Level
    290

    Default Re: Linux shell script help?

    Quote Originally Posted by SpArKy View Post
    % ps -o pid -o stat
    PID STAT
    4351 S
    7593 R

    Hope thats what u meant?
    Will try it 2moro morning lol.

    Thanks, and expect Karma lol.
    CONTACT

    My liver is evil and must be punished!



  5. #5
    DF VIP Member Roo's Avatar
    Join Date
    Aug 2002
    Location
    UK - Coventry
    Posts
    529
    Thanks
    0
    Thanked:        0
    Karma Level
    290

    Default Re: Linux shell script help?

    Works perfectly mate.

    You're a legend lol.

    Be aware of me possibly pestering you at a later date haha.
    CONTACT

    My liver is evil and must be punished!



  6. #6
    DF VIP Member Roo's Avatar
    Join Date
    Aug 2002
    Location
    UK - Coventry
    Posts
    529
    Thanks
    0
    Thanked:        0
    Karma Level
    290

    Default Re: Linux shell script help?

    New question guys,

    Find the directory from root (/) where all of the programs are which you make use of to
    manipulate the tree structure (cd, ls, mv, cp, and so on). What is the directory’s name? Why
    does it have this name? Verify that this directory is in the path string which the system searches
    through to find executable files and explain what you have found.
    I have answered it all apart from the last part. Can anybody help me ... need a reply by 2moro morning if possible lol.
    CONTACT

    My liver is evil and must be punished!



  7. #7
    DF VIP Member /dev/null's Avatar
    Join Date
    Feb 2004
    Location
    Behind You
    Posts
    2,952
    Thanks
    0
    Thanked:        0
    Karma Level
    451

    Default Re: Linux shell script help?

    %> echo $PATH

  8. #8
    DF VIP Member Roo's Avatar
    Join Date
    Aug 2002
    Location
    UK - Coventry
    Posts
    529
    Thanks
    0
    Thanked:        0
    Karma Level
    290

    Default Re: Linux shell script help?

    Quote Originally Posted by John Keymer View Post
    %> echo $PATH
    Cheers for reply John.

    So will it be alright to just type that into the terminal or do I need to add any commands after it?
    CONTACT

    My liver is evil and must be punished!



  9. #9
    DF VIP Member /dev/null's Avatar
    Join Date
    Feb 2004
    Location
    Behind You
    Posts
    2,952
    Thanks
    0
    Thanked:        0
    Karma Level
    451

    Default Re: Linux shell script help?

    I'd personally just type it in. you'll get an output similar to this:

    Code:
    /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/java/j2sdk1.4.2_06/bin:/opt/teaching/bin:/opt/scripts:/opt/common/bin:/home/oracle/sbin:/usr/games:/opt/spark/linux:.
    One option I guess would be to pipe it to grep or sed and then check whether it contains what you want there, however what's the point - way too much overkill unless you have a path variable that's longer than your arm, lol.

Similar Threads

  1. Windows 2000 on Xbox via Linux
    By Freaky in forum Microsoft Consoles
    Replies: 7
    Last Post: 17th November 2003, 03:10 PM
  2. Best 802.11 CF for Linux?
    By scruff in forum System Security
    Replies: 10
    Last Post: 12th October 2002, 09:22 AM
  3. Linux for PS2 - good value for a "new" pc?
    By brumbino in forum Sony Consoles
    Replies: 3
    Last Post: 27th September 2002, 09:32 AM
  4. Superman : new script review
    By TigerShark in forum Movie Talk
    Replies: 2
    Last Post: 25th September 2002, 01:50 PM
  5. Linux Citrix Nfuse Problem!
    By brumbino in forum PC Problems
    Replies: 0
    Last Post: 13th September 2002, 09:15 PM

Social Networking Bookmarks

Posting Permissions

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