Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In regards to question 4, I meant does having write permissions on a directory give you write permissions on all files within as well as giving you permissions to create new files in the directory??
No, you can't modify a file unless you have write permission to that file. But if you have write permission to the directory, then you can "delete" the file. In this sense, a "file" is just a directory entry, so what you are doing is modifying the directory itself, the file is not touched at all so the file permissions are irrelevant.
Of course, a file can have multiple hard links, so you are not necessarily "deleting" the file, you are just removing the link in that directory. The file is only deleted when there are no more links to it (and no program has the file open).
Alright, well after a bit of tinkering around in Fedora along with the advice given here I think I've got a bit of an idea. Could anyone suggest a good distro that I could use at home? I've heard good things about RedHat and Mandrake but I don't know enough about Linux to choose.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally Posted by ioerror
...Anyway, my above post shows that you cannot create hard links to directories. I believe that it was possible with ye olde unix (V6,V7 etc)...
Why then does Novell/SuSE make links like /boot/grub and when you click on it, you get /boot/grub/grub and so on and so forth ... I never understood that. Do you know why?
Why then does Novell/SuSE make links like /boot/grub and when you click on it, you get /boot/grub/grub and so on and so forth ... I never understood that. Do you know why?
I don't quite follow what you are using to do that but it's certainly not making hard links to directories. Presumably they are symlinks.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Yeah symlinks, sorry that was a little unclear. I used Konqueror to click on them. Still, what is the use of them, when all the iterations of /boot/grub -- /boot/grub/grub -- /boot/grub/grub/grub ... ad infinitum just point at /boot/grub ?
Well, there's not much point doing that, I'm not sure what Konqueror is doing there but if you don't specify a name for the link, it defaults to the target name, so I assume that's what is happening.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
It's not me, it's the standard setup of SuSE at least since 6.3. I just can't see the reason for it and I thought you might know what can be accomplished that way, they must do it for a reason...
It's not me, it's the standard setup of SuSE at least since 6.3. I just can't see the reason for it and I thought you might know what can be accomplished that way, they must do it for a reason...
Are you saying there is a file called "grub" in the /boot/grub directory, which is a link to /boot/grub ?
Show us - cd into that directory and post the output of ls -l (show us the link).
In general, you will find simlinks just pointing from odd-seeming places for backwards compatibility. This is why you will still find the old XFree86 directories there - many full of links to the xorg directories - even when xfree is no longer used.
You may also find a link /boot/grub/grub.conf pointing to /boot/grub/menue.lst, since these two files do the same thing and, while the distro maintainers may prefer one name, an app may reference the other.
Changing the name or location of a file can be a good idea, but doing so may break other programs. Hence the link from the old place to the new one. (Rather than try to convince several thousand programmers to do the same change see?)
After re-reading the post, I'm now a bit unclear on what exactly he has myself. At first it sounded like recursive links (/boot/grub/grub/grub etc), but this is impossible.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.