Find the answer to your Linux question:
Results 1 to 2 of 2
Hi eveyone: I'm new to linux programming, and I'm getting trouble with this exercise: I'm trying to find a way to print the current directory, without doing an explicit call ...
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    6

    Help me please - printing current directory

    Hi eveyone:

    I'm new to linux programming, and I'm getting trouble with this exercise:

    I'm trying to find a way to print the current directory, without doing an
    explicit call to pwd... like system(...) or exec (...)...

    In other words i need a C function that does the same as pwd, without calling it explicitly.

    Been looking all over, but cant figure it out... Is there any way to do so?

    Thanks in advance

    HW

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Check the manpages of the function:

    Code:
    getcwd()
    Regards

Posting Permissions

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