[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


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/
>>
>>108354761
>these things are just weird
Nah, they have their use case - like when you use hashes for file names to check for uniqueness across directories without having to check in each of them.
>but then again I have always done weird shit with file names, like using cryptographically hashed PRNG numbers as file names to store single AES blocks in seemingly random order to obfuscate the order in which blocks are to be decrypted



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.