sysv equivilant to getwd() -- getcwd()

Tanya Katz tanya at adds.newyork.NCR.COM
Wed Jul 19 23:25:02 AEST 1989


In-reply-to: your article <15005 at duke.cs.duke.edu>

> I am in need of getting the full pathname of the current working directory.
> In SUN OS (BSD) there is a call getwd() that when passed a buffer, returns
> that buffer with the current directory. Is there a work around for
> SYSTEM V? Is the PWD environment variable standard on all SYSTEM V machines
> under bourne shell and korn shell? Could I just do a getenv() on PWD?
> 
I think $PWD is just korn shell...

In system V  there is getcwd(3c)

from my manual

char * getcwd(buf, size)
char *buf;
int size;


> Thanks for any info.
Hope this is on your machine...

Tanya

------------------------------------------------------------------------------
    ###   ######  ######   #####       Tanya Katz       (516) 231-5400 x430 
   #   #  #     # #     # #           
  #     # #     # #     #  #####       ncrlnk!adds!tanya      
  ####### #     # #     #       #      tanya.katz at adds.newyork.ncr.com
  #     # ######  ######   #####       

  Applied Digital Data Systems, Inc.   100 Marcus Blvd., Hauppauge, NY 11788 
------------------------------------------------------------------------------



More information about the Comp.sys.att mailing list