My home directory was not where it was supposed to be. I was able to fix the directory location. Then needed to fix the permission of home directory with
$ cd /Users/
$ sudo chown -R hook1:staff /Users/hook1
chown: /Users/hook1: no file or directory
$ ls -F
Shared/ chris/ hook1???/
Home directory incorrectly appears as hook1???/
not hook1/
Is there a reason for this?
Best Answer
If what you posted was literally what the directory name is, then this should work:
The problem, as fd0 points out, is that you have invisible/unprintable characters in your directory name. Use basic, non-destructive shell commands to isolate the directory name using wildcards, then rename it. For example, try this:
That should result in exactly one directory being listed. If it does not, continue to add letters before the
*
in order to create a wildcard mask that produces exactly one result:If you get to a point where you go from more than one result to zero results, then you've stumbled upon another invisible character. Back up one letter, add a question mark then re-add the letter.
If you still have problems, play around with more
*
and?
until you have something that produces exactly one result:Once you have that, then use that in your
mv
command:If none of this works, please post the results of you
ls -ld
experiments.