ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   OSX question (https://www.scoobynet.com/computer-and-technology-related-34/945922-osx-question.html)

An0n0m0us 09 August 2012 02:52 PM

OSX question
 
If I wanted to change a location of a folder or folders in OSX can it be easily done, and I don't mean data but where apps are installed or might reference?

I'm running low on space on my hackintosh and want to know if I can move the apps folder to another partition/drive I have setup on a USB disk or say my profile/home folder to an external drive. In Windows you can install your programs wherever you like but most of the time I don't get asked in Lion.

Markus 09 August 2012 06:26 PM

Yes it is possible to move things around.
For the Applications folder, in theory, you should be able to select it, copy it somewhere else, delete the original, then make an alias of the Applications folder in the new location, move that alias back to the root of the hard drive and wham it'll work.

In practice, this might not work because the Finder baulks at copying items within Applications folder due to permission issues.

Another solution could be to move only certain apps. Personally I'd be wary of moving any system installed apps elsewhere, but other apps should be ok.

If I were moving the Applications folder, I'd use the terminal (Copy it somewhere else first, you'd be removing the Applications folder, and Terminal is within the Utilities folder inside), something like this (each line is a command in terminal - I'm omitting any responses from the commands, for example password prompts):


Code:

$ sudo ditto '/Applications' '/Volumes/BigDisk/Applications'
$ sudo rm -rf '/Applications'
$ sudo ln -s '/Volumes/BigDisk/Applications/' '/Applications'

What the above does is:
1. Copies, using the ditto command, the Applications folder from the root of the boot drive to the root of a disk/partition named BigDisk

2. Deletes the original Applications folder from the boot drive

3. Creates a symbolic link to the "new" Applications folder on the boot drive. This should be seen by the OS as the same things as the "real" folder. It is possible some installers might not like this though.

As for the home folder, a similar approach can be taken, but I'd want to create a new user account (or enable the root user and login as them) with admin permissions, login as that user and then relocate the folder, it'd be something like this:

Code:

$ sudo ditto '/Users/mark' '/Volumes/BigDisk/mark'
$ sudo rm -rf '/Users/mark'
$ sudo ln -s '/Volumes/BigDisk/mark/' '/Users/mark'

You could also try this:
1. Copy the home folder over to it's new location

2. Launch System Preferences

3. Click Accounts

4. Click the padlock to unlock it, if it's not unlocked

6. Control / Right click on the account whose home folder location you want to change, select the "Advanced Options" item

7. Look at the "Home Directory" section, click the "Choose" button and select the folder you moved. Click OK

You would probably then want to reboot.

An0n0m0us 09 August 2012 07:55 PM

Thanks Markus for the detailed reply. Moving the home folder looks the easiest option as I'd seen those settings when doing a restore from time machine earlier and then messing with account names and folder names etc. I'll only do it if free space becomes too tight or just re install the OS on a larger partition and use the migration tool to restore apps and home folder from time machine (have done this before and impressed how simple it is to do).


All times are GMT +1. The time now is 09:11 AM.


© 2024 MH Sub I, LLC dba Internet Brands