How to resolve "Too many levels of symbolic links" on my Documents folder?
126
It was suggested that I run find /home/$username/Documents -type l -exec ls -l {} \;
which provided this output: lrwxrwxrwx 1 sonar sonar 18 Nov 21 06:03 /home/$username/Documents -> /home/$username/Documents
Turns out the Documents folder was symlinked to itself. Running unlink Documents
completely resolved the issue and allowed me to access my Documents folder again with no issue. Thanks GracefulRestart!
Author by
UnityDev
Updated on September 18, 2022Comments
-
UnityDev over 1 year
I have a WPF application and i am opening a drawing in AutoCAD from my application. I just wanted to restrict user to change current profile using set current button, and i didn't want to make profile changes in registry settings.
-
GracefulRestart over 4 yearsThat
find
command is not producing any good output. Please try runningfind /home/$username -type l -exec ls -l {} \;
and post the result in your question to show all of the symbolic links. -
SonarMonkey over 4 yearsThe output of the command you provided was: lrwxrwxrwx 1 sonar sonar 21 Nov 21 06:03 /home/sonar/Documents -> /home/sonar/Documents (sonar being my username)
-
GracefulRestart over 4 yearsThat is a bad symbolic link, as it points to itself. You seem to have no Documents directory.
-
SonarMonkey over 4 yearsIs there any chance it was just somehow linked to itself, and that the symlink could be removed? If not, how do I just get rid of it and create a fresh Documents folder? Removing the directory doesn't work.
-
GracefulRestart over 4 yearsYou are not showing what you are trying, just stating "it doesn't work" does not give anyone useful information to attempt to help you. To remove the symbolic link, try
unlink /home/sonar/Documents
. You should not have been able to create that symbolic link if there was an actualDocuments
directory there. Did you check that maybe you renamed theDocuments
directory to something else or maybe put it in a different directory?find / -type d -name *Documents*
could help.
-
-
Pawel Debski almost 4 yearsI wonder how it could had happened. Anyone has an idea?