Too many levels of symbolic links

Forum rules
Before you post please read how to get help
Post Reply
markmc
Level 1
Level 1
Posts: 1
Joined: Mon May 21, 2018 11:07 pm

Too many levels of symbolic links

Post by markmc » Mon May 21, 2018 11:22 pm

I merged two directories in MATE that had the same name. The directory now shows up in Caja as a file with 'link (broken)' as the type.
Oops.

If I try to cd in the terminal I get...
bash: cd: get_iplayer: Too many levels of symbolic links

Any ideas how to get back into this directory?

lmuserx4849
Level 5
Level 5
Posts: 800
Joined: Wed Dec 17, 2014 2:55 am

Re: Too many levels of symbolic links

Post by lmuserx4849 » Thu Jun 28, 2018 3:20 am

markmc wrote:
Mon May 21, 2018 11:22 pm
I merged two directories in MATE that had the same name. The directory now shows up in Caja as a file with 'link (broken)' as the type.
Oops.

If I try to cd in the terminal I get...
bash: cd: get_iplayer: Too many levels of symbolic links

Any ideas how to get back into this directory?
There is some sort of symbolic link recursion.

Is get_iplayer a symbolic link, see output from ls -l get_iplayer

It'll look something like this (notice "l" at the beginning and the arrow): lrwxrwxrwx ... test2/src/test2 -> ./test2
The above symbolic link example, will produce the same error you are receiving.
If symlink was absolute, rather than relative it would have been okay.
By relative I mean, dot (./), which is the current directory. dot-dot (../) is the parent directory or go up one directory.
Absolute is the fully-qualified name: $HOME/test/test2/.

Go one directory up from get_iplayer and do: tree --noreport -fp
You might have to install the tree package.

iget_player I'm guessing is a symlink that is pointing to its' self.
The real directory is going to be on the left-hand side of the arrow (see above).
If you don't need the symlink remove (rm) it. Or you can make it absolute (ln -s) or change as necessary.

How did you do your "merge", Caja or cp or mv on the terminal?

I don't use Caja much, but when I right click I see: Make Link, Rename..., Copy to +, Move to +.

Commands:

Post Reply

Return to “Scripts & Bash”