mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
19 lines
300 B
C++
19 lines
300 B
C++
|
#include <stdio.h>
|
||
|
#include <errno.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
int main(int argc, char** argv)
|
||
|
{
|
||
|
if (argc != 2) {
|
||
|
fprintf(stderr, "usage: rm <path>\n");
|
||
|
return 1;
|
||
|
}
|
||
|
int rc = unlink(argv[1]);
|
||
|
if (rc < 0) {
|
||
|
perror("unlink");
|
||
|
return 1;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|
||
|
|