Community Page
- www.tech-recipes.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- thanks for the replies that have been posted.... i am so glad that my problem has been solved...
- ok it comes back and says they are terminated, however, task manager still shows all of the ones killed still in memory. I am REAL tired of constantly rebooting. In all my 20+ tech years I have...
- THANKS!
- THERE IS A BETTER WAY TO BYPASS TIME LIMIT 1. SWITCH OFF UR MODEM 2. DELETE COOKIES&TEMPORARY INTERNET FILES FROM INTERNET OPTIONS MENU 3.SWITCH ON UR MODEM N U CAN DOWNLOAD AGAIN WITHOUT...
- Amazing. I just googled for such a solution and here it is. Where as when I attempt the HP or microsoft websites for such a solution, they beat around the bush (like all the time). Thanks.
5 years ago
The UNIX file system stores files in inodes. The filesystem table contains a list of filenames, and the pointer to the inode in which that file exists.
A hard link creates a second entry in the filesystem table pointing to the same inode of the file. This can be illustrated with the ls command very easily:
1: # touch /this
2: # ln /this /root/that
3: # ls -i /this /root/that
4: 18 /root/that 18 /this
5: # rm -f /this
6: # ls -i /root/that
7: 18 /root/that
What did I do above? Here's a play-by-play:
1: create a file (/this)
2: hardlink the file (/this) to another file (/root/that)
3: ask to see the inodes that the files exist in
4: note that the inode numbers are identical - 18
5: delete the original file
6: show me the inode of the other file again
7: it's still the same.
In the above example, Inode 18 is occupied only once, and is referenced by two different path/filenames. Removing the first file doesn't in any way affect the second. The actual inode is still in use by the second reference. As soon as you remove all references, the inode is considered unused and can have new data written to it.
One caveat - hard links cannot span mount points. My own home directory is mounted from another disk, for example, so I cannot hardlink from /this to /home/bofh/that. The other caveat is that you cannot hard link directories.
Soft links are really pointers to a pointer. ls -i on both files will still show they are pointing at the same inode... but if you remove the original file, then the inode is actually completely dereferenced. The plus-side is that soft links can span mount points and you can soft link directories. The downside is that if you remove the original then the link is broken.
5 years ago
So imagine you are compiling a kernel, trying different patchsets. You dont want to make many "real" copies of the same files, as it takes lot of space and time to do so. Then you could just do hardlinks to the files. And then, only the modified files will actually exist:
cd /usr/src/
cp -rl linux-clean linux-experiment
then you will see, the new folder takes lot less space than the original one but is however fully funcional :) you can compile, apply patches, etc....
4 years ago
8 months ago