Added pwd(1).
This commit is contained in:
parent
b4f47f0f79
commit
081bb6481c
|
@ -14,6 +14,7 @@ sh \
|
||||||
mxsh \
|
mxsh \
|
||||||
clear \
|
clear \
|
||||||
ls \
|
ls \
|
||||||
|
pwd \
|
||||||
help \
|
help \
|
||||||
uptime \
|
uptime \
|
||||||
memstat \
|
memstat \
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
const size_t WDSIZE = 4096;
|
||||||
|
char wd[WDSIZE];
|
||||||
|
if ( !getcwd(wd, WDSIZE) ) { perror("getcwd"); return 1; }
|
||||||
|
printf("%s\n", wd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue