UNLINK(1P)

okay bestie, welcome to the POSIX Programmer's Manual page for unlink πŸ’– this one is part of that whole POSIX set, and here's the lil heads-up before we even start:

the Linux implementation of this interface may differ β€” so pls go check the corresponding Linux manual page for the deets on Linux behavior. also? it might not even be implemented on Linux at all. iconic of it, honestly. πŸ™ˆ

✨ NAME ✨

unlink β€” call the unlink() function πŸ¦‹


🌸 SYNOPSIS 🌸

unlink file

πŸ’– DESCRIPTION πŸ’–

the unlink utility shall perform this function call, literally:

unlink(file);

and ngl, a user may need appropriate privileges to invoke the unlink utility. so if it's giving "permission denied," that's why, bestie 😭


πŸŽ€ OPTIONS πŸŽ€

None. not a single one. she's minimal, she's clean, she's booked and busy doing exactly one thing πŸ’…


⭐ OPERANDS ⭐

the following operands shall be supported:

  • file β€” the pathname of an existing file. that's the one, that's the whole vibe.

🌈 STDIN 🌈

Not used. she doesn't want your input like that 🫢


🧚 INPUT FILES 🧚

Not used.


πŸ’œ ENVIRONMENT VARIABLES πŸ’œ

the following environment variables shall affect the execution of unlink:

  • LANG β€” provides a default value for the internationalization variables that are unset or null. (peep the Base Definitions volume of POSIX.1‐2017, Section 8.2, Internationalization Variables, for the precedence of internationalization variables used to determine the values of locale categories.)
  • LC_ALL β€” if set to a non-empty string value, this one overrides the values of all the other internationalization variables. she's the main character, periodt πŸ‘‘
  • LC_CTYPE β€” determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).
  • LC_MESSAGES β€” determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
  • NLSPATH β€” determines the location of message catalogs for the processing of LC_MESSAGES.

πŸ”₯ ASYNCHRONOUS EVENTS πŸ”₯

Default.


✨ STDOUT ✨

None. nothing. silence. she's not gonna chat with you πŸ“


πŸ¦‹ STDERR πŸ¦‹

the standard error shall be used only for diagnostic messages. that's it, that's the whole job.


🌸 OUTPUT FILES 🌸

None.


πŸ’– EXTENDED DESCRIPTION πŸ’–

None.


πŸŽ€ EXIT STATUS πŸŽ€

the following exit values shall be returned:

  • 0 β€” successful completion. slay ✨
  • >0 β€” an error occurred. πŸ’€

⭐ CONSEQUENCES OF ERRORS ⭐

Default.

the following sections are informative.


🌈 APPLICATION USAGE 🌈

None.


🧚 EXAMPLES 🧚

None.


πŸ’œ RATIONALE πŸ’œ

None.


πŸ‘‘ FUTURE DIRECTIONS πŸ‘‘

None.


πŸ”₯ SEE ALSO πŸ”₯

  • link
  • rm

the Base Definitions volume of POSIX.1‐2017, Chapter 8, Environment Variables

the System Interfaces volume of POSIX.1‐2017, unlink()


okay so legally speaking, portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. and if there's ever any discrepancy between this version and the original IEEE and The Open Group Standard β€” the original IEEE and The Open Group Standard is the referee document, no cap. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

also, any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html . 🫢


IEEE/The Open Group β€” 2017 β€” UNLINK(1P)

and that's the whole page, bestie πŸ’– brought to you by IEEE/The Open Group, dated 2017, filed under UNLINK(1P) β€” go forth and unlink responsibly, mwah 😭✨

πŸ“¦ where this page comes from