390
|
1 /* vi: set sw=4 ts=4:
|
|
2 *
|
|
3 * unlink.c - delete one file
|
|
4 *
|
|
5 * Copyright 2011 Rob Landley <rob@landley.net>
|
|
6 *
|
|
7 * See http://opengroup.org/onlinepubs/9699919799/utilities/unlink.html
|
|
8
|
|
9 USE_UNLINK(NEWTOY(unlink, "<1>1", TOYFLAG_USR|TOYFLAG_BIN))
|
|
10
|
|
11 config UNLINK
|
|
12 bool "unlink"
|
|
13 default y
|
|
14 help
|
|
15 usage: unlink FILE
|
|
16
|
|
17 Deletes one file.
|
|
18 */
|
|
19
|
|
20 #include "toys.h"
|
|
21
|
|
22 void unlink_main(void)
|
|
23 {
|
|
24 if (unlink(*toys.optargs))
|
|
25 perror_exit("Couldn't unlink `%s'", *toys.optargs);
|
|
26 }
|