Tcl_GetCwd(3) Tcl Library Procedures Tcl_GetCwd(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_GetCwd, Tcl_Chdir - manipulate the current working directory
SYNOPSIS
#include <tcl.h>
char *
Tcl_GetCwd(interp, bufferPtr)
int
Tcl_Chdir(path)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter in which to report an error, if any.
Tcl_DString *bufferPtr (in/out) This dynamic string is used to store the current working directory. At the time of the call it should
be uninitialized or free. The caller must eventually call Tcl_DStringFree to free up anything stored
here.
char *path (in) File path in UTF-8 format.
_________________________________________________________________DESCRIPTION
These procedures may be used to manipulate the current working directory for the application. They provide C-level access to the same
functionality as the Tcl pwd command.
Tcl_GetCwd returns a pointer to a string specifying the current directory, or NULL if the current directory could not be determined. If
NULL is returned, an error message is left in the interp's result. Storage for the result string is allocated in bufferPtr; the caller
must call Tcl_DStringFree() when the result is no longer needed. The format of the path is UTF-8.
Tcl_Chdir changes the applications current working directory to the value specified in path. The format of the passed in string must be
UTF-8. The function returns -1 on error or 0 on success.
KEYWORDS
pwd
Tcl 8.1 Tcl_GetCwd(3)
Check Out this Related Man Page
Tcl_GetCwd(3) Tcl Library Procedures Tcl_GetCwd(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_GetCwd, Tcl_Chdir - manipulate the current working directory
SYNOPSIS
#include <tcl.h>
char *
Tcl_GetCwd(interp, bufferPtr)
int
Tcl_Chdir(path)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter in which to report an error, if any.
Tcl_DString *bufferPtr (in/out) This dynamic string is used to store the current working directory. At the time of the call it should
be uninitialized or free. The caller must eventually call Tcl_DStringFree to free up anything stored
here.
char *path (in) File path in UTF-8 format.
_________________________________________________________________DESCRIPTION
These procedures may be used to manipulate the current working directory for the application. They provide C-level access to the same
functionality as the Tcl pwd command.
Tcl_GetCwd returns a pointer to a string specifying the current directory, or NULL if the current directory could not be determined. If
NULL is returned, an error message is left in the interp's result. Storage for the result string is allocated in bufferPtr; the caller
must call Tcl_DStringFree() when the result is no longer needed. The format of the path is UTF-8.
Tcl_Chdir changes the applications current working directory to the value specified in path. The format of the passed in string must be
UTF-8. The function returns -1 on error or 0 on success.
KEYWORDS
pwd
Tcl 8.1 Tcl_GetCwd(3)
Hi Folks,
In a Unix (ksh) script, is there a way to determine the current working directory path of another logged-in user? Of course, I can use "pwd" to find my own path. But, how do I find it for another active user?
Thanks for any input you can provide. LY (6 Replies)
This is my path for a directory in AIX
/oracle/ab/xx/yy/data/
i dont want to type this everytime at the prompt.
instead call the path using say
cd call (6 Replies)
Hello,
There are directories named by "yyyyMMdd" format. The one directory name is given and I should find & print that directory & its previous days directory names if exist.
For example:
20080401
20080402
20080403
20080404
...
The given date: 20080403
The result:
20080403... (4 Replies)
Hi,
I have a file with the path of the directory present somewhere in it.I have assigned the path of the directory name to a variable. I want to replace it with another string.The code i used was
sed -e '/$variable/sbcd/' filename.
since the path name includes slashes '/', my sed command... (9 Replies)
Hi, i have a question is there any way to store a system call (like pwd, or the path of a working directory) to a variable using C?? or is there another way that i can obtain the PATH??, and how can i use the same var to do a cd or make a file.
thank you in advance!! (1 Reply)
What does 'directory=`pwd $1` ' mean, I know pwd is present working directory, so does that command take the present working directory of the directory the user is in depending on the varible ($1)? (2 Replies)
If I the path to a directory, what command can I use to return the actual name of that directory.
test=`pwd`/folder1
> $test
folder1
I'd rather avoid anything with regular expressions. Any ideas? (1 Reply)