Bash - moved /Users/me to /usr/local/me - how to move it back and not break anything?
Solution 1:
First: nothing in the commands you listed should have moved your home directory (unless there's something even weirder than carriage returns in catalina.sh?), so I'd run some additional checks to makes sure that's what actually happened before trying to fix it based on that assumption. First, run ls -lae /usr/local/tori
and verify its output. You should see your regular home directory contents (including Desktop, Documents, etc, and probably a bunch of dotfiles). Make sure they're all owned by your account. Make sure the "." entry (the directory itself) is also owned by you. (The parent directory, "..", might be owned by root or something; that's ok.) Some of the standard subfolders should have an ACL like "0: group:everyone deny delete" on them. (So should the directory itself, but if it had you wouldn't have been able to do this, so it must not be there.)
If things aren't all there, aren't owned by you, or anything else looks weird, stop and investigate further before proceeding.
If that looks ok, and /Users/tori doesn't exist, then you should be able to fix it with:
sudo mv /usr/local/tori /Users/tori
Note: in your question, you used a number of absolute-looking paths without the leading "/" (e.g. usr/local/tori
instead of /usr/local/tori
). The difference matters; if you use a path that doesn't start with "/" (or "~"), it'll be resolved relative to your current location, which might not be what you expect.
Also, since we don't know what caused this, I'd take a really close look at the catalina.sh script, to make sure this doesn't happen again. And make sure you have a good backup of your system, in case things do go sideways again.