Accidently moved my home folder into the core services

Joined
Jan 25, 2010
Messages
5
Reaction score
0
Points
1
Hello i was wondering if someone could help me with this issue. I recently purchased an apple tv and have hacked it. i wanted to to mount the apple tv in finder and due to my total lack of technical knowledge have somehow moved my home folder into the core services folder using terminal which is giving me a bit of a headache trying to put it back in the users folder. could someone please tell me what the command is for doing this as when i try to move via finder it wants to copy and i dont have enough space on the hard disk.
The location of the home folder is now
/system/library/coreservices/

where it should be is
/users/

Any help would be most appreciated cos this is doing my head
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
To be perfectly blunt... people who have a "total lack of technical knowledge" shouldn't be trying to hack anything. /lecture

As to your problem... I'm dumbfounded that there isn't enough space to copy the folder back to where it belongs. How in the world is it supposed to be even usable with that little disk space? If you are able to boot into your ATV menu, I would just do a factory restore and be done with it.
Apple TV: How to perform a factory restore

If you insist on doing this by terminal, try this command:
sudo mv /System/Library/CoreServices/homefoldername /Users

If it isn't obvious.... "homefoldername" is whatever the name is of the folder that you mistakenly moved.

BTW... this command assumes you are using terminal directly on the AppleTV. If you are logged in to the ATV using SSH via another Mac, then you need to be sure you are properly connected to the ATV and running the commands on the ATV, not on the Mac you are using.
 
OP
F
Joined
Jan 25, 2010
Messages
5
Reaction score
0
Points
1
hey thanks for the reply, point taken once i sort this out then i wont be mucking around with it any more. however, the problem is not with my apple tv (sorry if my explanation was confusing) the problem is on my mac. the copy of my home folder is in core services and the new location is causing all sorts of problems. it wont allow me to move my home folder back to users and it wants to copy it instead (thats why i dont have enough space) and also if i did copy i would be a bit dubious about deleting the original in core services. anything i do copy does not have the correct folder icons . basically i just dont know how to mive the folder back to its original location. any further help would be much appreciated

thanks again
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Holy moley! Ok... you need to log in as a user with admin privileges, and not the one with the missing home folder. From this new user, use the terminal commands:

sudo rm /Users/missingfoldername
I'm assuming OS X remade your missing home folder, but without your stuff in it. This command will delete that new one. Next:

sudo mv /System/Library/CoreServices/missingfoldername /Users
This command will move the User folder from where you put it back to where it belongs.

Hopefully this will work, and more hopefully without royally hosing your permissions on your home folder.
 
OP
F
Joined
Jan 25, 2010
Messages
5
Reaction score
0
Points
1
still not quite there yet

ok i set up another user with admin privideges and tried this but when i try the sudo mv command it says: directory not empty, so i went into the accounts pane and clicked on advanced for my account and re-directed my home directory to the one in core services which has resolved a lot of my problems with bit torrent ect. also i was able to delete the ghost copy of my home folder from the users folder but couldnt manage to move my original home folder back there with that command?
 
C

chas_m

Guest
You have committed THE cardinal sin of Mac OS X (or any Unix-based OS): moving the home folder.

Here's what you should do (read the whole set of instructions before doing anything, this is a radical solution):

1. Backup the misplaced home folder to an external drive.
2. Erase the boot drive.
3. Install OS X from your restore DVD that came with your machine, or your retail disc if you have one.
4. Migration assistant will ask if you have accounts you want to restore from other hard drives. You do.
5. It will put back and generally re-connect your "lost" Home folder to the proper place. You will lose anything you've saved to the "newer" Home folder, but that's presumably not a problem.

You're now back to where you were (minus third-party apps you can reinstall/redownload from your original discs) before the mess.

Two tiny mini-lectures:
1. Hello, backup strategy! You need one!
2. Don't let your boot drive get so full. Mac OS X needs a fair amount of "working space" and thus you'll often hear a faintly-ridiculous rule to keep at least 20% of your hard drive free. That's overkill, but the principle is correct: I keep at least 5x the amount of RAM I have open on the hard drive (because it will use that space for virtual RAM along with all the other temp stuff it does). Basically, if you are below 10GB of free space on a modern Macintosh, you are asking for trouble.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Against my better judgement, I decided to test out the commands I gave with a test account. My first one to kill the "ghost" folder was off a bit (I left off a modifier, but you handled it anyway). Ooops! But the second one was correct and worked for me as expected. I don't know why it didn't work for you... either you typed it wrong or used them in the wrong order, or something... whatever it was, it appears you didn't follow the directions correctly. And at the risk of sounding rude... I'm not surprised. You got yourself into this mess by not following instructions or typing commands properly.

So I'm just going to echo what chas said. You are direly short on drive space as it is, and tinkering around with the command line is proving disastrous for you. Just BE VERY SURE to follow the directions!!!
 
OP
F
Joined
Jan 25, 2010
Messages
5
Reaction score
0
Points
1
many thanks +a question about time machine and network storage

hey thanks for all your help its all sorted now, and backups made! just 1 more question: finally got my 1tb external hard drive which is connected to apple tv mounted on my macbook (via macfuse and macfusion). now i want to back up to the partition which i used to back up directly but time machine does not recognize the hard disk now its on the network. Is there a solution to this?
Thanks again.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
hey thanks for all your help its all sorted now, and backups made! just 1 more question: finally got my 1tb external hard drive which is connected to apple tv mounted on my macbook (via macfuse and macfusion). now i want to back up to the partition which i used to back up directly but time machine does not recognize the hard disk now its on the network. Is there a solution to this?
Thanks again.

Why on Earth is that external drive connected to the Apple TV? Why not just connect it to your Mac?
 
OP
F
Joined
Jan 25, 2010
Messages
5
Reaction score
0
Points
1
the thing is ive got a macbook and i hooked up the drive to extend the memory of my apple tv and it also acts as network storage. just wondered if there was a way to get time machine to back up to it without unplugging it from the atv and plugging it into the laptop
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top