mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +00:00
Utilities: Implement pwd
This commit is contained in:
parent
f234c416af
commit
eb65e41a9c
1 changed files with 17 additions and 0 deletions
17
Userland/Utilities/pwd.cpp
Normal file
17
Userland/Utilities/pwd.cpp
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021, the SerenityOS developers.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int main(int, char**)
|
||||||
|
{
|
||||||
|
char* cwd = getcwd(nullptr, 0);
|
||||||
|
puts(cwd);
|
||||||
|
free(cwd);
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue