Thread: getting current directory

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    9

    getting current directory

    I am wondering if there is a function to get the current working directory. I found chdir() to set the current directory, but can't seem to find a function for getting the current directory. Thanks

  2. #2
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    man getcwd

  3. #3
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    or capture std out from pwd

    pwd just sends the full path to current directory to standard output.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  2. Immediate programming help! Please!
    By xMEGANx in forum C++ Programming
    Replies: 6
    Last Post: 02-20-2008, 12:52 PM
  3. Problem with simple case statements
    By shoobsie in forum C Programming
    Replies: 2
    Last Post: 05-08-2006, 08:39 AM
  4. compiler build error
    By KristTlove in forum C++ Programming
    Replies: 2
    Last Post: 11-30-2003, 10:16 AM
  5. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM