Hey everyone. Long time no see. I’m currently self-studying for the RHCSA and I want to double make sure my understanding of inodes and links is correct.
Basically, are all computer files(in user space) just containers of inodes that point to the actual data in the computer?
Let’s say I have a video file in /home/myname called “myvideo.mp4”. With my current understanding, “myvideo.mp4” is just a cover that points (stores an inode) to the actual data of the video somewhere in the computer.
If I make a soft link to “myvideo.mp4” called “soft”, then soft simply points to the file location of “myvideo.mp4” aka /home/myname/myvideo.mp4.
If I make a hard link to “myvideo.mp4” called “hard”, then hard points (stores the inode) to the actual data of “myvideo.mp4” somewhere on my system.
Is this understanding correct?
And if so, how exactly does a soft link connect to the original file? Does it just store the file path to “myvideo.mp4”, aka /home/myname/myvideo.mp4, or does it store another inode that points to “myvideo.mp4”, but not the actual data of “myvideo.mp4”?