Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 're: symbolic links/aliases' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
re: symbolic links/aliases
Authored by: rusto on Nov 06, '01 01:57:31PM
thx for the tip, while fiddling with symbolic links and comparing them to the traditional Mac way of making aliases (command-option-drag) I discovered that the terminal-created symbolic link may be smaller. Do this: make an alias of a folder in the finder then make a symbolic link of that same folder. Then look at the file size in Get Info. I'm not exactly sure what the second figure is but I see this: Finder alias: Symbolic link: Note that while their size "on disk" are both 4k, the symbolic link has only 9 bytes to the right of that while the alias has 650 bytes. Does anyone know what this second figure represents?

[ Reply to This | # ]
re: symbolic links/aliases
Authored by: jmil on Nov 06, '01 02:25:19PM
This has to do with the HFS+ file structure. HFS+ has a minimum file size of 4KB. This means that any file you create (even a text file with just the letter "a", only 1 byte large) will take up a minimum block of 4 kilobytes. Isn't this inefficient? Well, yes and no. It's inefficient because you have wasted space. However, it makes finding files easier (because the blocks of data are much larger than one byte), and nearly all files in the old Mac OS were much larger than 4 KB anyway. Now with OS X, we have several hundred thousand files, but most are still larger than 4KB and the cost of hard drives is so amazingly cheap now that it wouldn't matter anyway. I hope that helps to clear things up.

Jordan

[ Reply to This | # ]
re: symbolic links/aliases
Authored by: normcook on Nov 06, '01 02:27:24PM

that size in bytes is how much space the file really needs. however, the smallest amount of space that can be allocated for something is 4k. so 9 bytes or 650 bytes, it is going to use 4k of disk space.



[ Reply to This | # ]
re: symbolic links/aliases
Authored by: russoedu on Apr 26, '10 03:08:52AM
Aliases and Symbolic Links differs in lots of things. SymLinks just points to the original file location, so, if you move the original, it will not find it! Aliases points in a "magic" way that allways find the original, even if you move it or rename it. I had a big discussion about this with A. S. Tanembaun!!! And even him could tell how Mac Alias work, it's really a big magic to always point to the right place. That's why Alias files are bigger that SymLinks. Hardlinks, on the other way, points to the "node" (you have to understand how HFS+ works to understand this deeply) of the original file, so it IS the original file. That's why when you check it's size, it will look like the original. But the magic is that it does not take more file space than the original! You can test this in a big video file: do a HardLink and check how much of your disk was taken. Probably only 4kb (of HFS+ minimum file size). I made a video about Aliases to show to Tanembaun how it works: YouTube video link

[ Reply to This | # ]