previous: >>108346188
#define __NR_link 86
#define __NR_unlink 87
#define __NR_unlinkat 263
#define __NR_linkat 265
https://man7.org/linux/man-pages/man2/link.2.html
https://man7.org/linux/man-pages/man2/unlink.2.html
tl;dr:
create or destroy a (hard) link to a file
i was a bit torn on whether to include symlink in today's thread. especially since unlink handles both hard and symbolic links. but in the end, i decided it's different enough to warrant its own thread.
hard links are kind of weird. they can't span filesystems (makes sense when you think about it, due to their nature), and once created are indistinguishable from the original. i'm sure they have their use cases, but god, these things are just weird
also, something i have noticed. all of the filesystem operation syscalls have shitloads of error codes. i guess it's just a really complex subject
i don't really have much more to add about this one lol. there are only so many things you can say about "create a file"
relevant resources:
man man
man syscalls
https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/