Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

f_herl

macrumors newbie
Original poster
Oct 26, 2020
2
0
I have tried to create symbolic links (symlinks) for my Documents and Desktop folder that do not get reset after reboot on macOS 10.15 Catalina with root user as described in https://discussions.apple.com/thread/250723356 (created the symlinks with activated root account according to the post at the end).

Everything seemed to be fine until I realized that my Documents (300 GB of personal data) folder is empty now! However, the disk space information in Finder (similarly, OmniDiskSweeper in the drive list) shows there are only 30 GB available (like when my Documents where still visible), not 330 GB as expected with an empty Documents folder and no Documents visible in the trash. When sweeping with OmniDiskSweeper it shows an empty "0 bytes Documents" except for "0 bytes .localized" because of the "touch (...) .localized" command I had set with Terminal.

I hope my personal data is still there somewhere but I have no idea how to restore it!

I should add that I am a beginner with Terminal commands and have probably messed something up when repeatedly going through the process of creating (and deleting created) symlinks. I only remember a strange situation (logged in as root) when I saw the files in my Documents folder slowly disappearing one after the other (on my slow MacBook Pro Late 2011), like there was a deletion process running. The files in my Desktop folder have not disappeared, though. Thus, in Documents in my personal user account there were no files anymore, but when logging into root again they were visible again, at least for some time.

Then my idea was to unlock the symlinks again and see if the files would be visible again in my personal user account also but the only thing that happened is that the symlinks have also disappeared again, i.e., Catalina has created the original Documents and Desktop folders ("Dokumente" and "Schreibtisch" in German) in my home folder again.

Only now it comes to my mind that I simply should have moved the files in Documents to another folder when they were still visible under root but now it is too late for that. And restoring from a backup is not possible because of the "only 30 GB" free disk space, I guess, and I would prefer to understand the cause and solve this issue first.

Can anyone help me, please! Thanks a lot!
 
Not sure why you want to do this. I guess you are fighting against something in the O.S. which is trying to "correct" the situation. Why are you fighting it? Can't you just create a symlink /Users/xyz/Documents/OneDrive to point to /Users/xyz/OneDrive? Then you'd have a folder under Documents which points to that OneDrive folder.

ln -s /Users/xyz/OneDrive /Users/xyz/Documents/OneDrive

You don't need to use the root user at all. And you shouldn't be using it.
 
I'm a neanderthal (see my avatar), but I wouldn't be fooling around with symbolic links for data, or anything complicated like that.

Hope you have that missing data backed up!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.