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

Create symbolic links for all items in a folder UNIX
If, for some reason (space in my case), you want your applications to reside somewhere other than /Applications, you will still want to have links to those relocated programs in /Applications. For Apple applications, updates are likely to fail if the applications aren't located there, and tools like AppFresh only search that location.

Creating a bunch of aliases is tedious, so here's a quick Terminal trick (that I didn't think would work, as it doesn't under Linux):
$ cd /Applications
$ ln -s /path/to/apps/* .
Change /path/to/apps to the path to your replacement Applications folder, and then run those two Terminal commands (don't overlook the very-important . at the end of the second one), and you're done.
    •    
  • Currently 2.18 / 5
  You rated: 3 / 5 (11 votes cast)
 
[15,690 views]  

Create symbolic links for all items in a folder | 20 comments | Create New Account
Click here to return to the 'Create symbolic links for all items in a folder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create symbolic links for all items in a folder
Authored by: eagle on Apr 13, '09 08:21:05AM

Can you not just create a symbolic link at /Applications, to /path/to/apps?

# ln -s /Applications /path/to/apps



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: hypert on Apr 14, '09 09:45:36AM

That's the method I use. Once in a while a dumb installer/updated will remove the sym-link and create another /Applications folder. I then have to move the installed/updated app to my real Apps folder, and recreate the sym-link. Sigh. Still, it's worth it!



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: Anonymous on Apr 14, '09 02:19:24PM

Other way around. It's like making a copy, only your copy is a reference.

ln -s /path/to/apps /Applications

[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: revmatt on Apr 15, '09 07:41:39AM

The problem I had with this approach is that an update from Apple (don't remember if it was the 10.5.3 or 10.5.4) blew away the alias and overwrote it with a new applications folder in order to install updates to some of the apps in Utilities.

In response to the comments about just throwing in a bigger drive, I'm on a laptop with a 60G drive and I partition the drive in a way that makes my backups easy to do, but the catch is it makes my system partition smaller than I'd really like. If you've never replaced the hard drive in an iBook, look up the instructions online. It is decidedly non-trivial.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: S on Apr 13, '09 09:02:09AM

Creating aliases is easy. Select all, then drag into the other folder holding command and option.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: TonyT on Apr 13, '09 09:22:42AM
an alias is not the same as a symbolic link.
http://en.wikipedia.org/wiki/Alias_(Mac_OS)

[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: drudus on Apr 13, '09 09:37:15AM

'Mac aliases' sound better in principle since they keep track if items move, even across disks. However they don't work with unix scripts, updaters and installers can use scripts to set files and folders up correctly. Symbolic links are a better option if you expect to be needing to run updates on the linked files etc, just don't move them around.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: Dr. T on Apr 13, '09 10:22:27AM

Moving all your applications to regain disk space is inefficient and usually unnecessary. Why not uninstall infrequently used applications, move older documents, or archive the iTunes songs you never play?

Another approach for regaining disk space is to remove the unneeded parts of universal binary applications and to remove the unneeded language and localization files. Numerous utlities can safely "slim" applications.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: ghay on Apr 13, '09 11:00:23AM

I don't think you can say it's unnecessary or inefficient unless you know the workflow in use here.

If someone wants to do this because it is the way they work, and/or makes the most sense to them, I do not think anyone is qualified to tell them otherwise.

IMHO



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: Anonymous on Apr 14, '09 02:55:03PM

When you see someone fumbling around potentially causing future problems for themselves, I think it's perfectly fine to tell someone to stop it.

My advice? Buy a bigger disk. There's really no excuse at today's prices. Heck, buy two and an external case and get a copy of Carbon Copy Cloner (and donate while you're at it). Throw money and hardware at the problem. It'll save you headaches later on.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: pub3abn on Apr 14, '09 06:32:37AM

I keep folders of apps elsewhere because I like them organized by purpose. For example, I have all my font apps in one folder, etc. The reason for not doing this in the Applications folder is because that folder is already cluttered. In my case, I have over 100 items in /Applications, and about 300 apps altogether.

I tend to do things the other way around: I put aliases to the apps that are in my /Applications folder, in the folders that are sorted by category.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: Anonymous on Apr 14, '09 02:24:33PM

I install in default locations, because often (I'm sure you've found) Applications are so poorly written they don't work if they live anywhere else.

But like you, I like things grouped by purpose. So I have a Games folder inside Applications, containing Finder Aliases to the Games. I have a Fonts folder for font-manipulation programs. I have one called Graphics, another called Browsers, then Music and Movie.

Using aliases this way means I can have VLC appear in both Music and Movie.

It's the "Gmail" approach to applications. Tag, don't file.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: pub3abn on Apr 15, '09 05:56:49AM

I've never had an app not work because I've installed it somewhere other than the default Applications folder. (But I should add that apps which have installers, I always use with the default install location. But the vast majority of apps are drag-and-drop install.)



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: osxpounder on Apr 15, '09 02:49:26PM

That depends on what apps you use, and what apps I use. They differ, of course. Many of the apps I use insist on the /Applications folder. Many of them are not drag-and-drop installs. I wish all of them were drag-and-drop, and could run from any folder I choose. I prefer that and appreciate it as a useful, important feature. It's one of the things that tips the balance for me when comparing apps.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: wgscott on Apr 13, '09 04:22:05PM
I like to organize my applications into subdirectories of /Applications, but as noted the updater will then miss them (which is really stupid, since locating software with spotlight, which Apple might have heard of, is essentially instant). Anyway, the safest thing to do is leave everything in /Applications, but then make the applications hidden, eg,

cd /Applications
sudo chflags hidden iTunes.app


Then create a subdirectory, such as /Applications/Digitial Media, and make a symbolic link, eg:

ln -s /Applications/iTunes.app /Applications/Digital Media/.

Then the icon shows up in the finder in the subdirectory but not the main directory, and will be unaffected by updates. (I would slightly prefer to make a symbolic link in the other direction, and make the symbolic link itself invisible, but that doesn't seem to work -- but it does work for Mac-style aliases, which may or may not be problematic).

[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: wgscott on Apr 13, '09 04:23:19PM

The spaces need to be escaped or to have quotes around them. The escapes I added disappeared.



[ Reply to This | # ]
App Update widget
Authored by: postglock on Apr 13, '09 04:30:30PM
I'm not familiar with AppFresh, but App Update will search in specified directories for third-party-application updates.

[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: matsw on Apr 13, '09 04:45:27PM

It works in Linux just fine.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: leamanc on Apr 14, '09 11:43:13AM

Yeah, I came back to this post to ask why it doesn't work in Linux. Or maybe just what exactly doesn't work.

I have symlinked whole folders of files before. I have symlinked applications a bunch. Not sure what the real problem is here.



[ Reply to This | # ]
Create symbolic links for all items in a folder
Authored by: pub3abn on Apr 14, '09 06:25:30AM

AppFresh scans all the drives on my computer, with no links needed.



[ Reply to This | # ]