To delete a file named foo, one could type:
In PHP, one could use the following function to do the same:
The Perl syntax is identical to the PHP syntax, save for the parentheses:
In Node.js it is almost the same as the others:
In R (with the S language compatibility):
Similarly in Python:
"GNU Coreutils: unlink invocation". www.gnu.org. https://www.gnu.org/software/coreutils/manual/html_node/unlink-invocation.html ↩
"unlink". pubs.opengroup.org. https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html ↩
Differences Between rm and unlink Commands | Baeldung on Linux at archive.today (archived 2024-12-18) https://archive.today/20241218171826/https://www.baeldung.com/linux/rm-vs-unlink ↩
"PHP: unlink - Manual". php.net. https://php.net/unlink ↩
"unlink - perldoc.perl.org". perldoc.perl.org. https://perldoc.perl.org/functions/unlink.html ↩
"File System - Node.js v13.0.1 Documentation". nodejs.org. https://nodejs.org/api/fs.html#fs_fs_unlink_path_callback ↩
"os — Miscellaneous operating system interfaces — Python 3.8.0 documentation". python.org. https://docs.python.org/3/library/os.html#os.unlink ↩