[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1711202897927508.jpg (364 KB, 1088x1754)
364 KB
364 KB JPG
previous: >>108354761

#define __NR_symlink            88
#define __NR_symlinkat 266

https://man7.org/linux/man-pages/man2/symlink.2.html
https://man7.org/linux/man-pages/man7/symlink.7.html

tl;dr:
create a symbolic link to a file

symlinks are rather neat. i recommend reading the section 7 manpage. it's pretty well written
i don't really have much to say about these, except that i use them all the time in /usr/bin to make my dmenu shortcuts nicer. e.g., one of the first things i will do on a new box is
sudo ln -s /usr/bin/firefox /usr/bin/ff

similarly, many versioned binaries in your bin folder will do something similar (e.g., gcc/clang will actually be a symlink to some specifically versioned binary)
so it's really handy for that sort of thing. how do you use symlinks, anon?

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/
>>
>how do you use symlinks, anon?
Once used them to grant a webserver access to the X server so that it could generate PDFs from HTMLs. Couple years prior I had written my own X connector, thus knew about the cookie file, and provided it like that.
>>
File: 1750453058705884.jpg (75 KB, 735x658)
75 KB
75 KB JPG
>>108361692
i use symlinks indirectly through using stuff like pyenv. i am but a lowly normalfriend so there is no real use for symlinks to me apart from that. i use .desktop files to create something akin to .lnk on windows.
>>
>>108361963
that sounds crazy insecure, you were exposing that?
>>
>>108362257
No. It was an internal service.



[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.