Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why are Finder alias files so huge lately?

Why are alias files so big now? Before (OSX 10.3), they were rarely bigger than 1 KB, but now (OSX 10.7), they're often up to 1.6 MB! Can we do something to keep them small?


As I understand it, an alias is just a pointer or reference to another file. When you open or print it, the operating system actually opens or prints the original file referenced. All that needs to be stored is the directory path to the original file, either (or both) as a full reference or a relative reference, plus its file system ID and perhaps a drive ID (in case it's moved). This should take only a few bytes. On prior Mac operating system versions (e.g., 10.3.9), these alias files were just a few hundred bytes in size, rarely over 1,400 bytes total. But now I notice that, under Mac OS 10.7, newly created alias files are always hundreds of KB large, and can typically be as huge as 1.6 MB! The custom icon only accounts for a fraction of this size. However, sometimes they can still be as small as before (only a few hundred bytes). Old aliases from a prior OS version (usually but not always) still work in opening their original file, so apparently we don't need the extra size. So, what is in these files?! I know these are analogous to "shortcut" files under MS Windows, which are not that large.


Having aliases be so huge defeats the purpose of a small file reference that can be used in multiple other places. One would like to use an alias so as to not have to keep a copy of a large file. But I notice that MB-sized aliases are often created even when the original file is a tiny 1 KB file. Moreover, a larger original file might create a smaller alias than that for a smaller original file, even when both original files are in the same folder. What gives?


I use aliases extensively, so as to keep references to the same original file in multiple folders, since these files fall into the multiple categories that each folder contains. By using aliases, I ensure that there is only a single "master" version that is edited when a file is opened from any of those folders. Many of the original files are pretty small, yet their aliases are many orders of magnitude bigger. This is very discouraging towards using this handy feature. Is there something I am doing wrong to end up making them so big – perhaps a system setting? What is in these files that they need to be so huge?


I suppose I can use Unix symbolic link files by using a command line in Terminal, such as 'ln -s originalfile linkfile', but these are less functional, since you can't move or rename the originalfile without breaking the linkfile's association to it.

iMac, Mac OS X (10.7.4)

Posted on May 29, 2012 11:59 AM

Reply
28 replies

Sep 24, 2014 6:36 AM in response to fandumac

fandumac wrote:

I just found another solution to delete the data fork, in a simple way: Delete Data Fork 1.10

http://mac.softpedia.com/get/Automator-Actions---Workflows/Delete-Data-Fork.shtm

By the way, in the meantime I have modified the "Delete Data Fork" service more to my liking to simplify the workflow and to prevent accidental deletion of data forks which shouldn't get deleted in the first place. Eventually I will recompile the Service for "public use" and post it for download on my site.

However, to fully shrink a (Mountain) Lion alias, it's still a two-step process in combination with the aforementioned Shrink Alias context menu plugin.

Sep 25, 2014 4:41 AM in response to LearningMac7

A word of caution regarding symbolic links though:

Many apps treat them as the "real thing", i.e. they are resolving them as if they were the actual folders or files.


For example, I use symlinks to sync selected folders located outside my local Dropbox folder. (That works even both ways, i.e. when syncing two Macs via Dropbox, put a symlink into the Dropbox folder on both and the content of the linked external folders will be uploaded to the Dropbox server and synced.)


Whereas a regular Mac alias is always treated by Dropbox as is, not as a representation of the linked item.


In other words, symlinks are not a full replacement for Mac aliases, and vice versa. They may appear to have a similar effect, but they function differently. Sometimes it's better to use a symlink, another time an alias.


And that's also why the size of aliases is such a big deal. I use aliases a lot and I do that since decades already. A single (temporary) 5.8 MB alias alone is not such a big deal on today's hard disk. But if you have accumulated 1754 aliases over the years, then the file size becomes literally quite a big deal without much benefit. (Yes, I just counted them. Do the corresponding math yourselves. 🙂)

Oct 19, 2014 4:55 PM in response to Lukas

What is your website? And what did you modify on Delete Data Fork?


I'd like to see a ShrinkAlias service workflow as open as DDF, so we could simply put the two together.


In my brief test, doing `xatr -d com.apple.ResourceFork [alias-file-name]` in conjuntcion with DDF will make the alias go to 32 bytes and still work... But I doubt this has much benefits over symlinks and it probably lost too much data to keep the magical link when origin moves and stuff!


Here, for more info on my research on this subject:

http://apple.stackexchange.com/questions/123930/how-to-get-the-shortest-file-siz e-on-aliases

Jan 18, 2015 11:45 AM in response to DeathAllShare

Why are the alias files in Mac OS X (beyond Leopard) so large?

I do not actually know the answer to this, but (1) I found a simple solution (2) I suspect what the answer to the question is. The size of alias files in Mc OS X has been going up since Leopard. For example, in Leopard I started getting 508 kb for aliases to folders, and with later systems things got worse. Getting a 5mb alias in Yosemite is not unusual at all.

OK, why? [at least my theory, see 1 below] and how to get around it [this is not theory, it works, see 2 below].


1 Why: I think that Apple has been increasing the resolution it allows for icons, and developers [as well as Apple] have been producing icons with absurd resolutions. You can check this easily. Take any file, or app, select it, and use get Info from the file menu. Next copy the icon, using copy from the Edit menu. Now the icon is in the clipboard. Start preview, and click on "new from clipboard" [file menu]. Now you have the icon in preview. Look at the image, and zoom on it. You will find icons that can be blown up, and up, and up, and still have detail. This detail does not come free. It takes space in the HD.


2 Solution. I do not need to have the Encyclopedia Britannica encoded into my icons. I just want them to have enough detail to help me identify where they point to [sometimes a picture is easier than reading the file name]. Thus, in order to get smaller alias sizes, I reduce the icon file size,

and AFTER this is done, I produce the alias [some people have proposed producing the alias and then cutting the icon from the alias using get info and cut from the edit menu ... this does not work, I am not sure why]. OK, so how do you reduce icon sizes? Easy, I'll do it with an example:

Say you have an application, or folder, you are going to be making an alias for. First, use get info on the application, and get the icon into preview [as I explained earlier]. In preview now go to Tools/Adjust Size. Now select a new resolution. Note that this is going to be an icon, unless you have a microscope in your eyes, you do not need high res. Pick something small, like 20 pixels/inch. Once this is done, copy the resized icon from preview into the clipboard, and paste the new icon into the app/folder whatever you want to make an alias from. Then make the alias.

Notes:

A - For some reason, copying from preview into the clipboard is not very reliable. Sometimes you get nothing. In this case the whole process will fail. To make sure you got it there, use "Show Clipboard" from the Edit menu in the Finder.

B - Doing all of the above for each new icon is a pain in the neck. So, since most of the time what I need is aliases to either folders or text files, I create all my new folders and text files using a template which already has a reduced size icon.

Jan 18, 2015 11:58 AM in response to ruben3r

Got kicked out by the system before I finished. This goes at the end of my prior post


C - When you upgrade your OS, the upgrade can play a nasty trick on you. It will take all your low res, icons and re-interpret them as high res. [you can represent a white square with one single pixel, or a billion smaller ones]. I have avoided this by having all my work [including, thus, my work aliases] in a different partition, which is not mounted during the upgrade. I have been doing this since for-ever, cause system upgrades can do stuff you did not expect, and I do not want to risk my work. This bit with the aliases is just one more example.

May 3, 2015 4:28 AM in response to Lukas

Yes, a plugin or a custom service is nice to quickly get Unix symlinks. I use XtraFinder which also allows symbolic link creation within the Finder or Desktop.

Of course, it is still not an OSX alias so you will lose reference if the target file/directory has its name or path changed.


However, for an unknown reason, the linking still works inside the Finder (not inside the Terminal), i.e. I can click on a folder / file after its target has moved or changed name and both symlinks and aliases will open the right one! Any ideas on how that could be?


Aliases remember their targets independently from their paths and you can change the target by accessing the alias' property, but they don't seem to be usable from the Terminal... In other words, they are made to be used inside the Finder, and inside the Finder the bug stated above allow me to use the lightweight symlinks as well with no issues... Including when the files are moved. However I don't think this is very clean to count on that "meta-behaviour" of the Finder whereas the Terminal fails to retrieve the moved targets, so I think I will use symlinks with absolute paths and ensure the targets do not move nor change name.

Jun 24, 2015 4:23 AM in response to ruben3r

Thanks for the workaround, ruben3r. I used your method, then started experimenting and found a quick way to make smaller aliases.


Replace the Original File's Icon, Then Create an Alias

This will work using Preview or an image editing program like Photoshop Elements. To keep it simple, I've explained the process using Preview.

In Preview,

  • Open an image file, e.g., tiff, png, jpeg, gif, etc.
  • Activate the Rectangular Selection tool
  • Select the part of the image you want to use for an icon
  • Copy the selection

Tip: the more white and the fewer colors in the selection, the smaller the final alias size will be, and the smaller the original file size will be.In the Finder,

  • Select the file whose icon you want to change
  • Open the Get Info window for the file
  • Select the icon at the top left corner of the Get Info window
  • Paste the selection from your image file
  • Close the Get Info window

In the Finder,

Make an alias of the original file

Note: Pasting a different icon into an alias file's Get Info window doesn't reduce its size as much as creating an alias from a file whose icon has been modified.

Results - An Example

Using a 50-by-50 pixel selection--first from a black-and-white tiff image, second from a black-white-and-red jpeg image (a photograph with lots of color variation)--here are the resulting file sizes I got:

original
pdf file alias

original generic icon 286 KB 2.6 MB

modified icon - black & white 292 KB 480 MB

modified icon - color 305 KB 2.7 MB


As you mentioned, ruben3r, making one template file with a smaller icon and copying it to make new files is a huge time saver. I'm glad I found your post! I'd just about given up on using aliases anymore--I just can't bear to see 2.5 MB files with no content eating up space on my hard drive.

Oct 21, 2016 7:45 AM in response to Paulo Nascimento

Yes, I noticed as well that the alias bug has been fixed in 10.12.0. While I was checking out Sierra at my local Apple Store, I tested this out by creating a folder and an alias to that folder. The alias was no longer 1.5MB... YEAH!!!


I really want to update to Sierra for this reason alone... as well as Siri. But I don't often upgrade until x.x.1 or x.x.2 of a release. And I hear there are other (minor) bugs in Sierra yet and have not really seen any positive reviews.

Why are Finder alias files so huge lately?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.