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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a question related to hard link. I can understand the difference between soft link and hard link. But I wish to know what is the advantage of hard link. In the resources I have, it is mentioned that soft link is more advantageous since it is easy to change files and we can put a soft link to those files, also it is easy to identify an original file and its soft link ,but it is not possible to identify a hard link to an original file unless we know the inode numbers of the 2 files are the same.
With these disadvantages, why we are using hard link? Is it because it is useful in the programing side?
Also please let me know, what does it mean that "Hard link cannot be made to a different file system, but soft link can be made to a different file system"
Well .... the advantage of a hard-link is that as long
as at least one link exists, the file is physically there.
With a soft link, if you delete the original, the soft
link points into the void.
As for the question regarding "different file system":
If your hdd is partitioned, and e.g. parts reside on / (e.g.
sda1 and others on /usr (e.g. sda6), you can't make a hard
link from something on / to /usr, or vice versa.
You can set up hard links to an executable for several users in their home directories. If one of the users doesn't want to have that executable in the home directory, he/she can delete it. The other links are not affected, the executable till does exist, and it only takes disk space of a single copy.
Some users do not like softlinks to locations they do not understand or references to applications in root-protected locations like /bin - they simply feel they have to own the application by having in their own directory tree. It's also better as having hundreds of copies of the same executables, eating up disk space for the same thing. It is a preferred link type when maintaining accounts for non-technical people.