2

Question about alias files.

 3 years ago
source link: https://forums.macrumors.com/threads/question-about-alias-files.2278031/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Question about alias files.

Got a tip for us? Let us know

harrisonjr98

macrumors regular

Original poster

Dec 15, 2019
Hey all! Had an idea today to make a folder for the "documents" side of my dock with some aliases pointing to apps that I use frequently, but don't want in the dock. When creating the aliases, I had a finder window open to the Applications folder and another to the folder I was planning to use to house the aliases (in Documents, since I don't typically use Documents for actual documents.)

After cmd-clicking several apps and making the aliases, I clicked and dragged to the new folder and let go but it didn't move them - it appeared to *copy* them. Here's the weird part, though - the copies in the new folder weren't ".app alias" files, they just said ".app" but still showed the little shortcut arrow next to the app icons. Did I... make aliases of the aliases? In any case, I deleted these copies from the new folder (a bit scary since they're labeled .app, but it didn't delete the parent apps) and held cmd while clicking and dragging again which appeared to move them that time, no longer cluttering my Applications folder and appearing properly as ".app alias" files.

My question is - what happened? What exactly is a "copy" of an alias, and what's the point of that when you could just make another alias to the parent file? I naively assumed that click and drag would move the aliases by default instead of copy - they're on the same storage volume - why didn't they? Why did they appear as ".app"?

Side question for anyone knowledgeable - why is there a password dialogue prompt when making and moving aliases for system apps in the "utilities" folder of Applications? What's the point of that?

iStorm

macrumors regular
Sep 18, 2012
There are a couple things going on here. The Applications folder behaves a little differently than other normal folders. When dragging anything from Applications to another location, it will create an alias instead of moving it. Secondly, aliases only get the "alias" wording if there is already a file with the same name at the location where you're creating the alias.

For example, dragging Safari to another location will create an alias named "Safari"; or if you are showing filename extensions, then the alias gets named "Safari.app". In this case, the ".app" is part of the filename and is not the extension or a .app file. To further help show the alias naming behavior, dragging Safari to the same location again would then create an alias named "Safari alias" (or "Safari.app alias") since there is already a file/alias named "Safari" (or "Safari.app") at that location. This is why aliases created with the 'Make Alias' command always have the "alias" wording since it is creating the alias at the same location as the original file/filename.

So for your situation, when you dragged the ".app alias" alias to the other folder, it created an alias because it came from the Applications folder. MacOS is smart and makes the alias point to the app instead of the original alias; and since there was no existing file with the same name, it took on the app's name (without the "alias" wording). Your ".app alias" alias and ".app" alias were essentially identical, but just named differently. Holding Command while dragging did exactly what you described - it moved the file/alias. For what you're doing, all you need to do is just drag the app to the other folder to create the alias and potentially rename it to however you wish.

Now the Applications folder does this automatically, but another way to create aliases is to hold Command+Option while dragging the file to where you want the alias. Again, the naming will be behave as described above. It does not need to be ".app alias" to be a proper alias file. As long as the little shortcut arrow is showing, it is an alias. Another way to confirm is to go to 'Get Info' and verify that the Kind is Alias.

As for the password prompt when working with the Utilities folder, it has to do with they way the permissions are set up. I'm not sure why they have the permissions set up differently on that folder though.

Reactions: harrisonjr98

harrisonjr98

macrumors regular

Original poster

Dec 15, 2019
There are a couple things going on here. The Applications folder behaves a little differently than other normal folders. When dragging anything from Applications to another location, it will create an alias instead of moving it. Secondly, aliases only get the "alias" wording if there is already a file with the same name at the location where you're creating the alias.

For example, dragging Safari to another location will create an alias named "Safari"; or if you are showing filename extensions, then the alias gets named "Safari.app". In this case, the ".app" is part of the filename and is not the extension or a .app file. To further help show the alias naming behavior, dragging Safari to the same location again would then create an alias named "Safari alias" (or "Safari.app alias") since there is already a file/alias named "Safari" (or "Safari.app") at that location. This is why aliases created with the 'Make Alias' command always have the "alias" wording since it is creating the alias at the same location as the original file/filename.

So for your situation, when you dragged the ".app alias" alias to the other folder, it created an alias because it came from the Applications folder. MacOS is smart and makes the alias point to the app instead of the original alias; and since there was no existing file with the same name, it took on the app's name (without the "alias" wording). Your ".app alias" alias and ".app" alias were essentially identical, but just named differently. Holding Command while dragging did exactly what you described - it moved the file/alias. For what you're doing, all you need to do is just drag the app to the other folder to create the alias and potentially rename it to however you wish.

Now the Applications folder does this automatically, but another way to create aliases is to hold Command+Option while dragging the file to where you want the alias. Again, the naming will be behave as described above. It does not need to be ".app alias" to be a proper alias file. As long as the little shortcut arrow is showing, it is an alias. Another way to confirm is to go to 'Get Info' and verify that the Kind is Alias.

As for the password prompt when working with the Utilities folder, it has to do with they way the permissions are set up. I'm not sure why they have the permissions set up differently on that folder though.
Thank you thank you thank you! This is *exactly* the information I needed, worded perfectly in an eli5 fashion. Thanks for taking the time to explain, hopefully if anyone stumbles upon this thread in the future it'll answer their question too!

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK