Find the answer to your Linux question:
Results 1 to 5 of 5
hi all, i have a many process running in my machine with similar command and the command is 'gzip'. it is running by a program in a file. how will ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    3

    Lightbulb finding the file behind a process

    hi all,
    i have a many process running in my machine with similar command and the command is 'gzip'. it is running by a program in a file. how will i find out the file which is behind this command.

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    If you have a "program" running that is starting the gzip processes...

    Look at the parent PID of the running gzip to see what process started it.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    3

    Lightbulb

    Thank you for the reply,
    is there a way to find the code file behind?

  4. #4
    Just Joined!
    Join Date
    Dec 2009
    Posts
    1
    Try the "lsof" command. Use "ps -ef" to find the pid of the process in question and then execute "lsof -p <pid#>". This should list all open files for the process.

  5. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    3
    Thank you so much. this is what i was looking for.

Posting Permissions

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