this post was submitted on 09 Apr 2024
1 points (100.0% liked)

Linux

47450 readers
2427 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I thought I'll make this thread for all of you out there who have questions but are afraid to ask them. This is your chance!

I'll try my best to answer any questions here, but I hope others in the community will contribute too!

you are viewing a single comment's thread
view the rest of the comments
[–] vort3@lemmy.ml 0 points 5 months ago (1 children)

How do symlinks work from the point of view of software?

Imagine I have a file in my downloads folder called movie.mp4, and I have a symlink to it in my home folder.

Whenever I open the symlink, does the software (player) understand «oh this file seems like a symlink, I should go and open the original file», or it's a filesystem level stuff and software (player) basically has no idea if a file I'm opening is a symlink or the original movie.mp4?

Can I use sync software (like Dropbox, Gdrive or whatever) to sync symlinks? Can I use sync software to sync actual files, but only have symlinks in my sync folder?

Is there a rule of thumb to predict how software behaves when dealing with symlinks?

I just don't grok symbolic links.

[–] cyclohexane@lemmy.ml 0 points 5 months ago (1 children)

A symlink works more closely to the first way you described it. The software opening a symlink has to actually follow it. It's possible for a software to not follow the symlink (either intentionally or not).

So your sync software has to actually be able to follow symlinks. I'm not familiar with how gdrive and similar solutions work, but I know this is possible with something like rsync

[–] vort3@lemmy.ml 1 points 5 months ago

So I guess it's something like pressing ctrl+c: most software doesn't specifically handle this hotkey so in general it will interrupt a running process, but software can choose to handle it differently (like in vim ctrl+C does not interrupt it).

Thanks.

Fun fact: pressing X (close button) on a window does not make it that your app is closed, it just sends a signal that you wish to close it, your app can choose what to do with this signal.