1

I've never noticed this before (and I've been using Linux as a primary OS since 2008). Is there a limit to how many back-directory references you can make with ../?

Why?

I moved a file only for it to disappear. And now I'm trying to target a Java command and testing ls ../, I can only see back 3 directories but not 4.

3
  • I just tested, ls ../../../../../ worked perfectly well. It seems to be something funky in your setup. Dec 23, 2014 at 0:14
  • Rookie mistake. I'm not used to working with these Java files. After kestasx mentioned it, I found this was the problem. Normal Linux files that I deal with (web file and sysconfig in etc) don't use so many symlinks. It just never happened before.
    – xtian
    Dec 23, 2014 at 0:43
  • Haha :D That's good to know just in case. Happy holidays anyway :) Dec 23, 2014 at 0:56

1 Answer 1

1

The only hard limit I'm aware of is PATH_MAX, you can check it (for current folder, value is filesystem dependent):

getconf PATH_MAX .

I would guess some of path elements were symlinks, and Your file was moved into "unexpected" folder. You should be able to find it by name or content.

Try another shell (tcsh, sh, ... ) as there may be some shell configuration, which is the reason (aliases, ...).

Software bugs are also possible, but not likely for 2-3 levels...

1
  • Symlinks! This Java app is lousy with em. Thanks.
    – xtian
    Dec 23, 2014 at 0:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .