Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1023165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:34:28+00:00 2026-05-16T11:34:28+00:00

EDIT 1 I’m having problems using the arguments given. Maybe it is the way

  • 0

EDIT 1

I’m having problems using the arguments given. Maybe it is the way I’m passing my arguments through NSTask? Any suggestions as to how I can do this?

NSTask *file_Task = [NSTask new];
[file_Task setLaunchPath:@"/usr/sbin/lsof"];
[file_Task setArguments:[NSArray arrayWithObjects:@"+p", the_Pid, nil]];

Good Afternoon Fellow Coders….

I’m using the following command:

lsof +p 13812

to get the list of a files accessed by a process. The thing is it is giving me a lot of additional information that I don’t want such as TYPE, DEVICE, etc.

Is there an argument that I can add to the above command so that I get ONLY the NAME?

Thank you, thank you thank you! 🙂

Eric

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:34:28+00:00Added an answer on May 16, 2026 at 11:34 am

    You can use:

    lsof -Fn +p 12345
    

    This will output a list of lines, with the first being p followed by the process ID,
    and all following lines consisting of n followed by the file name.

    If you’d like to quickly preprocess this, you can do something similar to the following:

    lsof -Fn +p 12345 | tail -n +2 | cut -c2-
    

    See the lsof man page for more information, specifically under the OUTPUT FOR OTHER PROGRAMS heading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT : It turned out that this can only be done through an external
EDIT: iam using ajax to load text in my content that is why onload
EDIT: I am using MS SQL server 2008 R2 as well. Well, on a
EDIT : Summary : Git does not allow dates before 1973/03/03 09:46:40 (epoch+100000000s) given
EDIT Ok, so I can login fine but when I enter false info I'm
Edit Using the answers to the question I changed the test to the following
EDIT - I was able to fix this problem using code from 'Farray' with
EDIT: SOLVED. Use any of the solutions below, but document.onload needs to be changed
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
EDIT: I was an idiot. I simply had an image that was vertically long,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.