1 /* unlink - remove a directory entry */
3 /* Should only be used to remove directories by a superuser prepared to let
4 fsck clean up the file system. */
31 if (unlink (list
->word
->word
) != 0)
33 builtin_error ("%s: cannot unlink: %s", list
->word
->word
, strerror (errno
));
34 return (EXECUTION_FAILURE
);
37 return (EXECUTION_SUCCESS
);
40 char *unlink_doc
[] = {
41 "Remove a directory entry.",
45 struct builtin unlink_struct
= {
46 "unlink", /* builtin name */
47 unlink_builtin
, /* function implementing the builtin */
48 BUILTIN_ENABLED
, /* initial flags for builtin */
49 unlink_doc
, /* array of long documentation strings. */
50 "unlink name", /* usage synopsis; becomes short_doc */
51 0 /* reserved for internal use */